Files
PanguText/en/guide/home.html
github-actions[bot] 96f689cf92 Deploy to GitHub pages
2025-08-19 07:59:07 +00:00

35 lines
27 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="VuePress 2.0.0-rc.0">
<style>
:root {
--c-bg: #fff;
}
html.dark {
--c-bg: #22272e;
}
html, body {
background-color: var(--c-bg);
}
</style>
<script>
const userMode = localStorage.getItem('vuepress-color-scheme');
const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
document.documentElement.classList.toggle('dark', true);
}
</script>
<link rel="icon" href="/PanguText/images/logo.png"><title>Introduction | Pangu Text</title><meta name="description" content="A typographic solution for the optimal alignment of CJK characters, English words, and half-width digits">
<link rel="preload" href="/PanguText/assets/style-Rgr8LWAc.css" as="style"><link rel="stylesheet" href="/PanguText/assets/style-Rgr8LWAc.css">
<link rel="modulepreload" href="/PanguText/assets/app-6WmjFGj_.js"><link rel="modulepreload" href="/PanguText/assets/home.html-58uN4FuZ.js"><link rel="modulepreload" href="/PanguText/assets/demo_02-Y1eWnGtu.js"><link rel="modulepreload" href="/PanguText/assets/home.html-JcaZNIqz.js">
<link rel="prefetch" href="/PanguText/assets/index.html-EYu-iNkn.js" as="script"><link rel="prefetch" href="/PanguText/assets/index.html-QUZQg0UG.js" as="script"><link rel="prefetch" href="/PanguText/assets/index.html-H__tmzTP.js" as="script"><link rel="prefetch" href="/PanguText/assets/r8-proguard.html-69xTqe-J.js" as="script"><link rel="prefetch" href="/PanguText/assets/about.html-TshJpOH8.js" as="script"><link rel="prefetch" href="/PanguText/assets/changelog.html-_msERpTv.js" as="script"><link rel="prefetch" href="/PanguText/assets/contacts.html-Tyyrr6ry.js" as="script"><link rel="prefetch" href="/PanguText/assets/future.html-YFngAQwd.js" as="script"><link rel="prefetch" href="/PanguText/assets/quick-start.html-gd9ccG0P.js" as="script"><link rel="prefetch" href="/PanguText/assets/android.html-C0sED2vr.js" as="script"><link rel="prefetch" href="/PanguText/assets/compose.html-ta_OKiQ7.js" as="script"><link rel="prefetch" href="/PanguText/assets/about.html-y0__MDXj.js" as="script"><link rel="prefetch" href="/PanguText/assets/changelog.html-ZdZDMp0S.js" as="script"><link rel="prefetch" href="/PanguText/assets/contacts.html-KJJ9aywK.js" as="script"><link rel="prefetch" href="/PanguText/assets/future.html-H3GTPPFW.js" as="script"><link rel="prefetch" href="/PanguText/assets/r8-proguard.html-D-RxO_Ql.js" as="script"><link rel="prefetch" href="/PanguText/assets/home.html-3yl9a2Vj.js" as="script"><link rel="prefetch" href="/PanguText/assets/quick-start.html-ddi7SydO.js" as="script"><link rel="prefetch" href="/PanguText/assets/android.html-er-PlyuE.js" as="script"><link rel="prefetch" href="/PanguText/assets/compose.html-Bw78KuUV.js" as="script"><link rel="prefetch" href="/PanguText/assets/404.html-6Yl8cQE3.js" as="script"><link rel="prefetch" href="/PanguText/assets/index.html-dAhbvs7X.js" as="script"><link rel="prefetch" href="/PanguText/assets/index.html-hmQ6cGF4.js" as="script"><link rel="prefetch" href="/PanguText/assets/index.html-zXy82L0K.js" as="script"><link rel="prefetch" href="/PanguText/assets/r8-proguard.html-PqTZGCA2.js" as="script"><link rel="prefetch" href="/PanguText/assets/about.html-pwF3sebZ.js" as="script"><link rel="prefetch" href="/PanguText/assets/changelog.html-34En5i-H.js" as="script"><link rel="prefetch" href="/PanguText/assets/contacts.html--fNpIi3D.js" as="script"><link rel="prefetch" href="/PanguText/assets/future.html-e9RoH0aV.js" as="script"><link rel="prefetch" href="/PanguText/assets/quick-start.html-1kKh8kqs.js" as="script"><link rel="prefetch" href="/PanguText/assets/android.html-XQpTmuqf.js" as="script"><link rel="prefetch" href="/PanguText/assets/compose.html-GjfF5jqY.js" as="script"><link rel="prefetch" href="/PanguText/assets/about.html-bq8LJH03.js" as="script"><link rel="prefetch" href="/PanguText/assets/changelog.html-qt_u2gKo.js" as="script"><link rel="prefetch" href="/PanguText/assets/contacts.html-8fmQuQW2.js" as="script"><link rel="prefetch" href="/PanguText/assets/future.html-zvpjuSDl.js" as="script"><link rel="prefetch" href="/PanguText/assets/r8-proguard.html-uJ-Di8s4.js" as="script"><link rel="prefetch" href="/PanguText/assets/home.html-DfgIm_Cu.js" as="script"><link rel="prefetch" href="/PanguText/assets/quick-start.html-SQ1_-HIx.js" as="script"><link rel="prefetch" href="/PanguText/assets/android.html-qjs2U6CQ.js" as="script"><link rel="prefetch" href="/PanguText/assets/compose.html-6IPIfrmc.js" as="script"><link rel="prefetch" href="/PanguText/assets/404.html-YkmvtGWa.js" as="script">
</head>
<body>
<div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/PanguText/en/" class=""><img class="logo" src="/PanguText/images/logo.png" alt="Pangu Text"><span class="site-name can-hide">Pangu Text</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Get Started</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a aria-current="page" href="/PanguText/en/guide/home.html" class="router-link-active router-link-exact-active router-link-active" aria-label="Introduction"><!--[--><!--]--> Introduction <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/guide/quick-start.html" class="" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Libraries</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/PanguText/en/library/android.html" class="" aria-label="Android"><!--[--><!--]--> Android <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/library/compose.html" class="" aria-label="Jetpack Compose"><!--[--><!--]--> Jetpack Compose <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Configs</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/PanguText/en/config/r8-proguard.html" class="" aria-label="R8 &amp; Proguard Obfuscate"><!--[--><!--]--> R8 &amp; Proguard Obfuscate <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>About</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/PanguText/en/about/changelog.html" class="" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/about/future.html" class="" aria-label="Looking Toward the Future"><!--[--><!--]--> Looking Toward the Future <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/about/contacts.html" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/about/about.html" class="" aria-label="About This Document"><!--[--><!--]--> About This Document <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><!--]--></ul></div></div><div class="navbar-item"><a href="/PanguText/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a aria-current="page" href="/PanguText/en/guide/home.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/PanguText/zh-cn/guide/home.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/BetterAndroid/PanguText" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-color-mode-button" title="toggle color mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><form class="search-box" role="search"><input type="search" placeholder="Search" autocomplete="off" spellcheck="false" value><!----></form></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Get Started</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a aria-current="page" href="/PanguText/en/guide/home.html" class="router-link-active router-link-exact-active router-link-active" aria-label="Introduction"><!--[--><!--]--> Introduction <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/guide/quick-start.html" class="" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Libraries</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/PanguText/en/library/android.html" class="" aria-label="Android"><!--[--><!--]--> Android <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/library/compose.html" class="" aria-label="Jetpack Compose"><!--[--><!--]--> Jetpack Compose <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Configs</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/PanguText/en/config/r8-proguard.html" class="" aria-label="R8 &amp; Proguard Obfuscate"><!--[--><!--]--> R8 &amp; Proguard Obfuscate <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>About</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/PanguText/en/about/changelog.html" class="" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/about/future.html" class="" aria-label="Looking Toward the Future"><!--[--><!--]--> Looking Toward the Future <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/about/contacts.html" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/PanguText/en/about/about.html" class="" aria-label="About This Document"><!--[--><!--]--> About This Document <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><!--]--></ul></div></div><div class="navbar-item"><a href="/PanguText/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a aria-current="page" href="/PanguText/en/guide/home.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/PanguText/zh-cn/guide/home.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/BetterAndroid/PanguText" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active collapsible">Get Started <span class="down arrow"></span></p><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/PanguText/en/guide/home.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Introduction"><!--[--><!--]--> Introduction <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/PanguText/en/guide/home.html#background" class="router-link-active router-link-exact-active sidebar-item" aria-label="Background"><!--[--><!--]--> Background <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/PanguText/en/guide/home.html#effects" class="router-link-active router-link-exact-active sidebar-item" aria-label="Effects"><!--[--><!--]--> Effects <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/PanguText/en/guide/home.html#language-requirement" class="router-link-active router-link-exact-active sidebar-item" aria-label="Language Requirement"><!--[--><!--]--> Language Requirement <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/PanguText/en/guide/home.html#contribution" class="router-link-active router-link-exact-active sidebar-item" aria-label="Contribution"><!--[--><!--]--> Contribution <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a href="/PanguText/en/guide/quick-start.html" class="sidebar-item" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">Libraries <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/PanguText/en/library/android.html" class="sidebar-item" aria-label="Android"><!--[--><!--]--> Android <!--[--><!--]--></a><!----></li><li><a href="/PanguText/en/library/compose.html" class="sidebar-item" aria-label="Jetpack Compose"><!--[--><!--]--> Jetpack Compose <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">Configs <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/PanguText/en/config/r8-proguard.html" class="sidebar-item" aria-label="R8 &amp; Proguard Obfuscate"><!--[--><!--]--> R8 &amp; Proguard Obfuscate <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">About <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/PanguText/en/about/changelog.html" class="sidebar-item" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a><!----></li><li><a href="/PanguText/en/about/future.html" class="sidebar-item" aria-label="Looking Toward the Future"><!--[--><!--]--> Looking Toward the Future <!--[--><!--]--></a><!----></li><li><a href="/PanguText/en/about/contacts.html" class="sidebar-item" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a><!----></li><li><a href="/PanguText/en/about/about.html" class="sidebar-item" aria-label="About This Document"><!--[--><!--]--> About This Document <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><!--]--><div><h1 id="introduction" tabindex="-1"><a class="header-anchor" href="#introduction" aria-hidden="true">#</a> Introduction</h1><blockquote><p><code>PanguText</code> is a solution for CJK (Chinese, Japanese, Korean) and English word, half-width number spacing.</p></blockquote><h2 id="background" tabindex="-1"><a class="header-anchor" href="#background" aria-hidden="true">#</a> Background</h2><p>This project was created because, until now, there hasnt been a public solution to perfectly address the typography issues between Chinese, Japanese, Korean, and English. Typically, when mixing CJK (i.e. Chinese, Japanese, Korean) with English, aesthetic issues can arise—a historical legacy stemming from the differences in writing conventions between full-width and half-width characters. Although the W3C has now established CJK typography guidelines, only a few individuals or companies willing to adhere to these standards have adopted this approach.</p><p>Currently, the known vendor solutions are as follows:</p><ul><li>Apple platforms (iOS, iPadOS, macOS, tvOS, watchOS) text typography solutions</li><li>Xiaomis (HyperOS) text typography optimization</li><li>OrginOSs font-based text typography optimization</li></ul><p>However, these solutions are closed-source and cannot be implemented on other platforms. We aim to provide an open-source solution adaptable to various scenarios, featuring low intrusiveness and easy integration, allowing more developers to effectively address text typography issues.</p><p>The primary inspiration for this project comes from <a href="https://github.com/vinta/pangu.js" target="_blank" rel="noopener noreferrer">pangu.js<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>, which offers a set of regular expressions for CJK typography. We have optimized these solutions to format text across platforms without inserting extra space characters. We extend this approach further to explore additional possibilities.</p><p>Heartfelt thanks to the original developer of <strong>pangu.js</strong> for providing the foundational solution.</p><h2 id="effects" tabindex="-1"><a class="header-anchor" href="#effects" aria-hidden="true">#</a> Effects</h2><p>As you can see, the typography scheme of <code>PanguText</code> does not work by simply inserting spaces between CJK characters and English words. Instead, it leverages each platform&#39;s native handling to automatically add whitespace between these characters, ensuring minimal intrusion.</p><blockquote><p>Before Applying (Top) vs. After Applying (Bottom)</p></blockquote><img src="/PanguText/images/demo_01.png" width="300"><blockquote><p>Dynamic Application</p></blockquote><img src="/PanguText/images/demo_02.gif" width="480"><p><code>PanguText</code> supports dynamic application, which means it can add whitespace gaps to each character on-the-fly as you input text.</p><div class="custom-container tip"><p class="custom-container-title">Developer&#39;s Perspective</p><p>I personally do not recommend manually inserting spaces between CJK and English characters for typographic refinement if your software or system natively supports enhanced typographic formatting.</p><p>The spacing can vary across fonts, which may lead to formatting issues and the insertion of undesired space characters.</p><p>In certain contexts, such as URLs, filenames, or hashtags containing “#”, these spaces are not acceptable.</p><p>However, in special scenarios—for example, within code comments or documentation—it can be beneficial to add spaces, as these areas typically do not employ automated formatting tools.</p><p>Another point to consider is the use of different punctuation marks in different languages. Avoid mixing full-width and half-width punctuation marks. If you must use half-width punctuation marks to annotate full-width text, ensure that the half-width marks are followed by a space to complete the character space (the same applies to English).</p></div><h2 id="language-requirement" tabindex="-1"><a class="header-anchor" href="#language-requirement" aria-hidden="true">#</a> Language Requirement</h2><p>It is recommended to use Kotlin as the preferred development language.</p><p>This project is entirely written in Kotlin and is compatible with Java in some parts, but it may not be fully compatible.</p><p>All demo &amp; sample codes in the document will be described using Kotlin, if you dont know how to use Kotlin at all, you may not get the best experience.</p><h2 id="contribution" tabindex="-1"><a class="header-anchor" href="#contribution" aria-hidden="true">#</a> Contribution</h2><p>The maintenance of this project is inseparable from the support and contributions of all developers.</p><p>This project is currently in its early stages, and there may still be some problems or lack of functions you need.</p><p>If possible, feel free to submit a PR to contribute features you think are needed to this project or go to <a href="https://github.com/BetterAndroid/PanguText/issues" target="_blank" rel="noopener noreferrer">GitHub Issues<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> to make suggestions to us.</p></div><!--[--><!--]--></div><footer class="page-meta"><div class="meta-item edit-link"><a class="external-link meta-item-label" href="https://github.com/BetterAndroid/PanguText/edit/main/docs-source/src/en/guide/home.md" rel="noopener noreferrer" target="_blank" aria-label="Edit this page on GitHub"><!--[--><!--]--> Edit this page on GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><div class="meta-item contributors"><span class="meta-item-label">Contributors: </span><span class="meta-item-info"><!--[--><!--[--><span class="contributor" title="email: qzmmcn@163.com">fankesyooni</span><!----><!--]--><!--]--></span></div></footer><nav class="page-nav"><p class="inner"><!----><span class="next"><a href="/PanguText/en/guide/quick-start.html" class="" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
<script type="module" src="/PanguText/assets/app-6WmjFGj_.js" defer></script>
</body>
</html>