=> b505a32d5e3dc6f8405cf48a5f854b1c09534038
[1mdiff --git a/CMakeLists.txt b/CMakeLists.txt[m [1mindex f0968831..2d7128ed 100644[m [1m--- a/CMakeLists.txt[m [1m+++ b/CMakeLists.txt[m [36m@@ -41,6 +41,7 @@[m [mset (EMBED_RESOURCES[m res/FiraSans-Italic.ttf[m res/FiraSans-Light.ttf[m res/FiraSans-Regular.ttf[m [32m+[m[32m res/KosugiMaru-Regular.ttf[m res/NotoEmoji-Regular.ttf[m res/Nunito-ExtraBold.ttf[m res/Nunito-ExtraLight.ttf[m [1mdiff --git a/res/KosugiMaru-Regular.ttf b/res/KosugiMaru-Regular.ttf[m [1mnew file mode 100644[m [1mindex 00000000..44dcbff6[m Binary files /dev/null and b/res/KosugiMaru-Regular.ttf differ [1mdiff --git a/res/LICENSE_KosugiMaru.txt b/res/LICENSE_KosugiMaru.txt[m [1mnew file mode 100644[m [1mindex 00000000..75b52484[m [1m--- /dev/null[m [1m+++ b/res/LICENSE_KosugiMaru.txt[m [36m@@ -0,0 +1,202 @@[m [32m+[m[41m [m [32m+[m[32m Apache License[m[41m [m [32m+[m[32m Version 2.0, January 2004[m[41m [m [32m+[m[32m http://www.apache.org/licenses/[m[41m [m [32m+[m[41m [m [32m+[m[32m TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION[m[41m [m [32m+[m[41m [m [32m+[m[32m 1. Definitions.[m[41m [m [32m+[m[41m [m [32m+[m[32m "License" shall mean the terms and conditions for use, reproduction,[m[41m [m [32m+[m[32m and distribution as defined by Sections 1 through 9 of this document.[m[41m [m [32m+[m[41m [m [32m+[m[32m "Licensor" shall mean the copyright owner or entity authorized by[m[41m [m [32m+[m[32m the copyright owner that is granting the License.[m[41m [m [32m+[m[41m [m [32m+[m[32m "Legal Entity" shall mean the union of the acting entity and all[m[41m [m [32m+[m[32m other entities that control, are controlled by, or are under common[m[41m [m [32m+[m[32m control with that entity. For the purposes of this definition,[m[41m [m [32m+[m[32m "control" means (i) the power, direct or indirect, to cause the[m[41m [m [32m+[m[32m direction or management of such entity, whether by contract or[m[41m [m [32m+[m[32m otherwise, or (ii) ownership of fifty percent (50%) or more of the[m[41m [m [32m+[m[32m outstanding shares, or (iii) beneficial ownership of such entity.[m[41m [m [32m+[m[41m [m [32m+[m[32m "You" (or "Your") shall mean an individual or Legal Entity[m[41m [m [32m+[m[32m exercising permissions granted by this License.[m[41m [m [32m+[m[41m [m [32m+[m[32m "Source" form shall mean the preferred form for making modifications,[m[41m [m [32m+[m[32m including but not limited to software source code, documentation[m[41m [m [32m+[m[32m source, and configuration files.[m[41m [m [32m+[m[41m [m [32m+[m[32m "Object" form shall mean any form resulting from mechanical[m[41m [m [32m+[m[32m transformation or translation of a Source form, including but[m[41m [m [32m+[m[32m not limited to compiled object code, generated documentation,[m[41m [m [32m+[m[32m and conversions to other media types.[m[41m [m [32m+[m[41m [m [32m+[m[32m "Work" shall mean the work of authorship, whether in Source or[m[41m [m [32m+[m[32m Object form, made available under the License, as indicated by a[m[41m [m [32m+[m[32m copyright notice that is included in or attached to the work[m[41m [m [32m+[m[32m (an example is provided in the Appendix below).[m[41m [m [32m+[m[41m [m [32m+[m[32m "Derivative Works" shall mean any work, whether in Source or Object[m[41m [m [32m+[m[32m form, that is based on (or derived from) the Work and for which the[m[41m [m [32m+[m[32m editorial revisions, annotations, elaborations, or other modifications[m[41m [m [32m+[m[32m represent, as a whole, an original work of authorship. For the purposes[m[41m [m [32m+[m[32m of this License, Derivative Works shall not include works that remain[m[41m [m [32m+[m[32m separable from, or merely link (or bind by name) to the interfaces of,[m[41m [m [32m+[m[32m the Work and Derivative Works thereof.[m[41m [m [32m+[m[41m [m [32m+[m[32m "Contribution" shall mean any work of authorship, including[m[41m [m [32m+[m[32m the original version of the Work and any modifications or additions[m[41m [m [32m+[m[32m to that Work or Derivative Works thereof, that is intentionally[m[41m [m [32m+[m[32m submitted to Licensor for inclusion in the Work by the copyright owner[m[41m [m [32m+[m[32m or by an individual or Legal Entity authorized to submit on behalf of[m[41m [m [32m+[m[32m the copyright owner. For the purposes of this definition, "submitted"[m[41m [m [32m+[m[32m means any form of electronic, verbal, or written communication sent[m[41m [m [32m+[m[32m to the Licensor or its representatives, including but not limited to[m[41m [m [32m+[m[32m communication on electronic mailing lists, source code control systems,[m[41m [m [32m+[m[32m and issue tracking systems that are managed by, or on behalf of, the[m[41m [m [32m+[m[32m Licensor for the purpose of discussing and improving the Work, but[m[41m [m [32m+[m[32m excluding communication that is conspicuously marked or otherwise[m[41m [m [32m+[m[32m designated in writing by the copyright owner as "Not a Contribution."[m[41m [m [32m+[m[41m [m [32m+[m[32m "Contributor" shall mean Licensor and any individual or Legal Entity[m[41m [m [32m+[m[32m on behalf of whom a Contribution has been received by Licensor and[m[41m [m [32m+[m[32m subsequently incorporated within the Work.[m[41m [m [32m+[m[41m [m [32m+[m[32m 2. Grant of Copyright License. Subject to the terms and conditions of[m[41m [m [32m+[m[32m this License, each Contributor hereby grants to You a perpetual,[m[41m [m [32m+[m[32m worldwide, non-exclusive, no-charge, royalty-free, irrevocable[m[41m [m [32m+[m[32m copyright license to reproduce, prepare Derivative Works of,[m[41m [m [32m+[m[32m publicly display, publicly perform, sublicense, and distribute the[m[41m [m [32m+[m[32m Work and such Derivative Works in Source or Object form.[m[41m [m [32m+[m[41m [m [32m+[m[32m 3. Grant of Patent License. Subject to the terms and conditions of[m[41m [m [32m+[m[32m this License, each Contributor hereby grants to You a perpetual,[m[41m [m [32m+[m[32m worldwide, non-exclusive, no-charge, royalty-free, irrevocable[m[41m [m [32m+[m[32m (except as stated in this section) patent license to make, have made,[m[41m [m [32m+[m[32m use, offer to sell, sell, import, and otherwise transfer the Work,[m[41m [m [32m+[m[32m where such license applies only to those patent claims licensable[m[41m [m [32m+[m[32m by such Contributor that are necessarily infringed by their[m[41m [m [32m+[m[32m Contribution(s) alone or by combination of their Contribution(s)[m[41m [m [32m+[m[32m with the Work to which such Contribution(s) was submitted. If You[m[41m [m [32m+[m[32m institute patent litigation against any entity (including a[m[41m [m [32m+[m[32m cross-claim or counterclaim in a lawsuit) alleging that the Work[m[41m [m [32m+[m[32m or a Contribution incorporated within the Work constitutes direct[m[41m [m [32m+[m[32m or contributory patent infringement, then any patent licenses[m[41m [m [32m+[m[32m granted to You under this License for that Work shall terminate[m[41m [m [32m+[m[32m as of the date such litigation is filed.[m[41m [m [32m+[m[41m [m [32m+[m[32m 4. Redistribution. You may reproduce and distribute copies of the[m[41m [m [32m+[m[32m Work or Derivative Works thereof in any medium, with or without[m[41m [m [32m+[m[32m modifications, and in Source or Object form, provided that You[m[41m [m [32m+[m[32m meet the following conditions:[m[41m [m [32m+[m[41m [m [32m+[m[32m (a) You must give any other recipients of the Work or[m[41m [m [32m+[m[32m Derivative Works a copy of this License; and[m[41m [m [32m+[m[41m [m [32m+[m[32m (b) You must cause any modified files to carry prominent notices[m[41m [m [32m+[m[32m stating that You changed the files; and[m[41m [m [32m+[m[41m [m [32m+[m[32m (c) You must retain, in the Source form of any Derivative Works[m[41m [m [32m+[m[32m that You distribute, all copyright, patent, trademark, and[m[41m [m [32m+[m[32m attribution notices from the Source form of the Work,[m[41m [m [32m+[m[32m excluding those notices that do not pertain to any part of[m[41m [m [32m+[m[32m the Derivative Works; and[m[41m [m [32m+[m[41m [m [32m+[m[32m (d) If the Work includes a "NOTICE" text file as part of its[m[41m [m [32m+[m[32m distribution, then any Derivative Works that You distribute must[m[41m [m [32m+[m[32m include a readable copy of the attribution notices contained[m[41m [m [32m+[m[32m within such NOTICE file, excluding those notices that do not[m[41m [m [32m+[m[32m pertain to any part of the Derivative Works, in at least one[m[41m [m [32m+[m[32m of the following places: within a NOTICE text file distributed[m[41m [m [32m+[m[32m as part of the Derivative Works; within the Source form or[m[41m [m [32m+[m[32m documentation, if provided along with the Derivative Works; or,[m[41m [m [32m+[m[32m within a display generated by the Derivative Works, if and[m[41m [m [32m+[m[32m wherever such third-party notices normally appear. The contents[m[41m [m [32m+[m[32m of the NOTICE file are for informational purposes only and[m[41m [m [32m+[m[32m do not modify the License. You may add Your own attribution[m[41m [m [32m+[m[32m notices within Derivative Works that You distribute, alongside[m[41m [m [32m+[m[32m or as an addendum to the NOTICE text from the Work, provided[m[41m [m [32m+[m[32m that such additional attribution notices cannot be construed[m[41m [m [32m+[m[32m as modifying the License.[m[41m [m [32m+[m[41m [m [32m+[m[32m You may add Your own copyright statement to Your modifications and[m[41m [m [32m+[m[32m may provide additional or different license terms and conditions[m[41m [m [32m+[m[32m for use, reproduction, or distribution of Your modifications, or[m[41m [m [32m+[m[32m for any such Derivative Works as a whole, provided Your use,[m[41m [m [32m+[m[32m reproduction, and distribution of the Work otherwise complies with[m[41m [m [32m+[m[32m the conditions stated in this License.[m[41m [m [32m+[m[41m [m [32m+[m[32m 5. Submission of Contributions. Unless You explicitly state otherwise,[m[41m [m [32m+[m[32m any Contribution intentionally submitted for inclusion in the Work[m[41m [m [32m+[m[32m by You to the Licensor shall be under the terms and conditions of[m[41m [m [32m+[m[32m this License, without any additional terms or conditions.[m[41m [m [32m+[m[32m Notwithstanding the above, nothing herein shall supersede or modify[m[41m [m [32m+[m[32m the terms of any separate license agreement you may have executed[m[41m [m [32m+[m[32m with Licensor regarding such Contributions.[m[41m [m [32m+[m[41m [m [32m+[m[32m 6. Trademarks. This License does not grant permission to use the trade[m[41m [m [32m+[m[32m names, trademarks, service marks, or product names of the Licensor,[m[41m [m [32m+[m[32m except as required for reasonable and customary use in describing the[m[41m [m [32m+[m[32m origin of the Work and reproducing the content of the NOTICE file.[m[41m [m [32m+[m[41m [m [32m+[m[32m 7. Disclaimer of Warranty. Unless required by applicable law or[m[41m [m [32m+[m[32m agreed to in writing, Licensor provides the Work (and each[m[41m [m [32m+[m[32m Contributor provides its Contributions) on an "AS IS" BASIS,[m[41m [m [32m+[m[32m WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or[m[41m [m [32m+[m[32m implied, including, without limitation, any warranties or conditions[m[41m [m [32m+[m[32m of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A[m[41m [m [32m+[m[32m PARTICULAR PURPOSE. You are solely responsible for determining the[m[41m [m [32m+[m[32m appropriateness of using or redistributing the Work and assume any[m[41m [m [32m+[m[32m risks associated with Your exercise of permissions under this License.[m[41m [m [32m+[m[41m [m [32m+[m[32m 8. Limitation of Liability. In no event and under no legal theory,[m[41m [m [32m+[m[32m whether in tort (including negligence), contract, or otherwise,[m[41m [m [32m+[m[32m unless required by applicable law (such as deliberate and grossly[m[41m [m [32m+[m[32m negligent acts) or agreed to in writing, shall any Contributor be[m[41m [m [32m+[m[32m liable to You for damages, including any direct, indirect, special,[m[41m [m [32m+[m[32m incidental, or consequential damages of any character arising as a[m[41m [m [32m+[m[32m result of this License or out of the use or inability to use the[m[41m [m [32m+[m[32m Work (including but not limited to damages for loss of goodwill,[m[41m [m [32m+[m[32m work stoppage, computer failure or malfunction, or any and all[m[41m [m [32m+[m[32m other commercial damages or losses), even if such Contributor[m[41m [m [32m+[m[32m has been advised of the possibility of such damages.[m[41m [m [32m+[m[41m [m [32m+[m[32m 9. Accepting Warranty or Additional Liability. While redistributing[m[41m [m [32m+[m[32m the Work or Derivative Works thereof, You may choose to offer,[m[41m [m [32m+[m[32m and charge a fee for, acceptance of support, warranty, indemnity,[m[41m [m [32m+[m[32m or other liability obligations and/or rights consistent with this[m[41m [m [32m+[m[32m License. However, in accepting such obligations, You may act only[m[41m [m [32m+[m[32m on Your own behalf and on Your sole responsibility, not on behalf[m[41m [m [32m+[m[32m of any other Contributor, and only if You agree to indemnify,[m[41m [m [32m+[m[32m defend, and hold each Contributor harmless for any liability[m[41m [m [32m+[m[32m incurred by, or claims asserted against, such Contributor by reason[m[41m [m [32m+[m[32m of your accepting any such warranty or additional liability.[m[41m [m [32m+[m[41m [m [32m+[m[32m END OF TERMS AND CONDITIONS[m[41m [m [32m+[m[41m [m [32m+[m[32m APPENDIX: How to apply the Apache License to your work.[m[41m [m [32m+[m[41m [m [32m+[m[32m To apply the Apache License to your work, attach the following[m[41m [m [32m+[m[32m boilerplate notice, with the fields enclosed by brackets "[]"[m[41m [m [32m+[m[32m replaced with your own identifying information. (Don't include[m[41m [m [32m+[m[32m the brackets!) The text should be enclosed in the appropriate[m[41m [m [32m+[m[32m comment syntax for the file format. We also recommend that a[m[41m [m [32m+[m[32m file or class name and description of purpose be included on the[m[41m [m [32m+[m[32m same "printed page" as the copyright notice for easier[m[41m [m [32m+[m[32m identification within third-party archives.[m[41m [m [32m+[m[41m [m [32m+[m[32m Copyright [yyyy] [name of copyright owner][m[41m [m [32m+[m[41m [m [32m+[m[32m Licensed under the Apache License, Version 2.0 (the "License");[m[41m [m [32m+[m[32m you may not use this file except in compliance with the License.[m[41m [m [32m+[m[32m You may obtain a copy of the License at[m[41m [m [32m+[m[41m [m [32m+[m[32m http://www.apache.org/licenses/LICENSE-2.0[m[41m [m [32m+[m[41m [m [32m+[m[32m Unless required by applicable law or agreed to in writing, software[m[41m [m [32m+[m[32m distributed under the License is distributed on an "AS IS" BASIS,[m[41m [m [32m+[m[32m WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m [m [32m+[m[32m See the License for the specific language governing permissions and[m[41m [m [32m+[m[32m limitations under the License.[m[41m [m [1mdiff --git a/res/OFL.txt b/res/LICENSE_Nunito.txt[m [1msimilarity index 100%[m [1mrename from res/OFL.txt[m [1mrename to res/LICENSE_Nunito.txt[m [1mdiff --git a/res/about/help.gmi b/res/about/help.gmi[m [1mindex 1be94132..9f394e5a 100644[m [1m--- a/res/about/help.gmi[m [1m+++ b/res/about/help.gmi[m [36m@@ -199,5 +199,6 @@[m [mThis application uses fonts licensed under the Open Font License.[m [m Additional fonts:[m [m [32m+[m[32m=> https://fonts.google.com/specimen/Kosugi+Maru#license Kosugi Maru (Apache License 2.0)[m => https://github.com/googlefonts/noto-emoji/blob/master/LICENSE Noto Emoji (Apache License 2.0)[m => https://dn-works.com/ufas/ Symbola (Public Domain)[m \ No newline at end of file[m [1mdiff --git a/src/ui/text.c b/src/ui/text.c[m [1mindex 3de1c83b..a48d0e0e 100644[m [1m--- a/src/ui/text.c[m [1m+++ b/src/ui/text.c[m [36m@@ -92,6 +92,7 @@[m [mstruct Impl_Font {[m iBool isMonospaced;[m iBool manualKernOnly;[m enum iFontId symbolsFont; /* font to use for symbols */[m [32m+[m[32m enum iFontId japaneseFont; /* font to use for Japanese glyphs */[m uint32_t indexTable[128 - 32];[m };[m [m [36m@@ -108,6 +109,7 @@[m [mstatic void init_Font(iFont *d, const iBlock *data, int height, enum iFontId sym[m stbtt_GetFontVMetrics(&d->font, &ascent, NULL, NULL);[m d->baseline = (int) ascent * d->scale;[m d->symbolsFont = symbolsFont;[m [32m+[m[32m d->japaneseFont = regularJapanese_FontId;[m d->isMonospaced = iFalse;[m memset(d->indexTable, 0xff, sizeof(d->indexTable));[m }[m [36m@@ -189,6 +191,11 @@[m [mstatic void initFonts_Text_(iText *d) {[m { &fontNotoEmojiRegular_Embedded, textSize * 1.666f, largeSymbols_FontId },[m { &fontNotoEmojiRegular_Embedded, textSize * 2.000f, hugeSymbols_FontId },[m { &fontNotoEmojiRegular_Embedded, textSize * 0.866f, smallSymbols_FontId },[m [32m+[m[32m { &fontKosugiMaruRegular_Embedded, textSize * 0.666f, smallSymbols_FontId },[m [32m+[m[32m { &fontKosugiMaruRegular_Embedded, textSize, symbols_FontId },[m [32m+[m[32m { &fontKosugiMaruRegular_Embedded, textSize * 1.333f, mediumSymbols_FontId },[m [32m+[m[32m { &fontKosugiMaruRegular_Embedded, textSize * 1.666f, largeSymbols_FontId },[m [32m+[m[32m { &fontKosugiMaruRegular_Embedded, textSize * 2.000f, hugeSymbols_FontId },[m };[m iForIndices(i, fontData) {[m iFont *font = &d->fonts[i];[m [36m@@ -200,6 +207,18 @@[m [mstatic void initFonts_Text_(iText *d) {[m font->manualKernOnly = iTrue;[m }[m }[m [32m+[m[32m /* Japanese script. */ {[m [32m+[m[32m /* Everything defaults to the regular sized japanese font, so these are just[m [32m+[m[32m the other sizes. */[m [32m+[m[32m /* TODO: Add these to the table above... */[m [32m+[m[32m font_Text_(monospace_FontId)->japaneseFont = smallJapanese_FontId;[m [32m+[m[32m font_Text_(monospaceSmall_FontId)->japaneseFont = smallJapanese_FontId;[m [32m+[m[32m font_Text_(medium_FontId)->japaneseFont = mediumJapanese_FontId;[m [32m+[m[32m font_Text_(mediumBold_FontId)->japaneseFont = mediumJapanese_FontId;[m [32m+[m[32m font_Text_(largeBold_FontId)->japaneseFont = largeJapanese_FontId;[m [32m+[m[32m font_Text_(largeLight_FontId)->japaneseFont = largeJapanese_FontId;[m [32m+[m[32m font_Text_(hugeBold_FontId)->japaneseFont = hugeJapanese_FontId;[m [32m+[m[32m }[m gap_Text = iRound(gap_UI * d->contentFontSize);[m }[m [m [36m@@ -344,13 +363,19 @@[m [mstatic void cache_Font_(iFont *d, iGlyph *glyph, int hoff) {[m SDL_Renderer *render = txt->render;[m SDL_Texture *tex = NULL;[m SDL_Surface *surface = NULL;[m [31m- const iChar ch = char_Glyph(glyph);[m iRect *glRect = &glyph->rect[hoff];[m /* Rasterize the glyph using stbtt. */ {[m surface = rasterizeGlyph_Font_(d, glyph->glyphIndex, hoff * 0.5f);[m if (hoff == 0) {[m int adv;[m [31m- stbtt_GetGlyphHMetrics(&d->font, glyph->glyphIndex, &adv, NULL);[m [32m+[m[32m const uint32_t gIndex = glyph->glyphIndex;[m [32m+[m[32m// float advScale = d->scale;[m [32m+[m[32m// if (isJapanese_FontId(d - text_.fonts)) {[m [32m+[m[32m /* Treat as monospace. */[m [32m+[m[32m// gIndex = stbtt_FindGlyphIndex(&d->font, 0x5712);[m [32m+[m[32m// advScale *= 2.0f;[m [32m+[m[32m// }[m [32m+[m[32m stbtt_GetGlyphHMetrics(&d->font, gIndex, &adv, NULL);[m glyph->advance = d->scale * adv;[m }[m stbtt_GetGlyphBitmapBoxSubpixel(&d->font,[m [36m@@ -389,6 +414,13 @@[m [miLocalDef iFont *characterFont_Font_(iFont *d, iChar ch, uint32_t *glyphIndex) {[m return emoji;[m }[m }[m [32m+[m[32m /* Japanese perhaps? */[m [32m+[m[32m if (ch > 0x3040) {[m [32m+[m[32m iFont *japanese = font_Text_(d->japaneseFont);[m [32m+[m[32m if (japanese != d && (*glyphIndex = glyphIndex_Font_(japanese, ch)) != 0) {[m [32m+[m[32m return japanese;[m [32m+[m[32m }[m [32m+[m[32m }[m /* Fall back to Symbola for anything else. */[m iFont *font = font_Text_(d->symbolsFont);[m *glyphIndex = glyphIndex_Font_(font, ch);[m [36m@@ -437,6 +469,10 @@[m [mstatic iChar nextChar_(const char **chPos, const char *end) {[m return ch;[m }[m [m [32m+[m[32mstatic enum iFontId fontId_Text_(const iFont *font) {[m [32m+[m[32m return font - text_.fonts;[m [32m+[m[32m}[m [32m+[m iLocalDef iBool isWrapBoundary_(iChar a, iChar b) {[m if (b == '/' || b == '-' || b == ',' || b == ';' || b == ':') {[m return iTrue;[m [36m@@ -540,29 +576,24 @@[m [mstatic iRect run_Font_(iFont *d, enum iRunMode mode, iRangecc text, size_t maxLe[m SDL_RenderCopy(text_.render, text_.cache, (const SDL_Rect *) &glyph->rect[hoff], &dst);[m }[m /* Symbols and emojis are NOT monospaced, so must conform when the primary font[m [31m- is monospaced. */[m [31m- xpos += (d->isMonospaced && glyph->font != d ? monoAdvance : glyph->advance);[m [32m+[m[32m is monospaced. Except with Japanese script, that's larger than the normal monospace. */[m [32m+[m[32m xpos += (monoAdvance > 0 && !isJapanese_FontId(fontId_Text_(glyph->font)) ? monoAdvance[m [32m+[m[32m : glyph->advance);[m xposMax = iMax(xposMax, xpos);[m if (continueFrom_out && (mode == measureNoWrap_RunMode || isWrapBoundary_(prevCh, ch))) {[m lastWordEnd = chPos;[m }[m [32m+[m[32m#if defined (LAGRANGE_ENABLE_KERNING)[m /* Check the next character. */[m if (!d->isMonospaced && glyph->font == d) {[m /* TODO: No need to decode the next char twice; check this on the next iteration. */[m const char *peek = chPos;[m const iChar next = nextChar_(&peek, text.end);[m [31m-#if 0[m [31m- if (ch == '/' && next == '/') {[m [31m- /* Manual kerning for double-slash. */[m [31m- xpos -= glyph->rect[hoff].size.x * 0.5f;[m [31m- } else[m [31m-#endif[m [31m-#if defined (LAGRANGE_ENABLE_KERNING)[m if (enableKerning_Text && !d->manualKernOnly && next) {[m xpos += d->scale * stbtt_GetGlyphKernAdvance(&d->font, glyph->glyphIndex, next);[m }[m [31m-#endif[m }[m [32m+[m[32m#endif[m prevCh = ch;[m if (--maxLen == 0) {[m break;[m [1mdiff --git a/src/ui/text.h b/src/ui/text.h[m [1mindex 2b4ec5c3..9a22620f 100644[m [1m--- a/src/ui/text.h[m [1m+++ b/src/ui/text.h[m [36m@@ -40,7 +40,7 @@[m [menum iFontId {[m mediumBold_FontId,[m largeBold_FontId,[m hugeBold_FontId,[m [31m- largeLight_FontId,[m [32m+[m[32m largeLight_FontId,[m[41m [m /* symbol fonts */[m defaultSymbols_FontId,[m defaultMediumSymbols_FontId,[m [36m@@ -57,10 +57,17 @@[m [menum iFontId {[m largeEmoji_FontId,[m hugeEmoji_FontId,[m smallEmoji_FontId,[m [32m+[m[32m /* japanese script */[m [32m+[m[32m smallJapanese_FontId,[m [32m+[m[32m regularJapanese_FontId,[m [32m+[m[32m mediumJapanese_FontId,[m [32m+[m[32m largeJapanese_FontId,[m [32m+[m[32m hugeJapanese_FontId,[m max_FontId,[m [m /* Meta: */[m fromSymbolsToEmojiOffset_FontId = 7,[m [32m+[m /* UI fonts: */[m uiLabel_FontId = default_FontId,[m uiShortcuts_FontId = default_FontId,[m [36m@@ -78,6 +85,10 @@[m [menum iFontId {[m banner_FontId = largeLight_FontId,[m };[m [m [32m+[m[32miLocalDef iBool isJapanese_FontId(enum iFontId id) {[m [32m+[m[32m return id >= smallJapanese_FontId && id <= hugeJapanese_FontId;[m [32m+[m[32m}[m [32m+[m #define variationSelectorEmoji_Char ((iChar) 0xfe0f)[m [m extern int gap_Text; /* affected by content font size */[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).