aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-08-17 10:03:49 +0800
committerPo Lu2023-08-17 10:04:47 +0800
commitab8bc93cd42233c59a187b99dfb011c6fc5b86f6 (patch)
tree691146f0c93c7647311bdce12f86aac17c1bb606
parentf38bcf37dc47ce172c985d1c621df3583eaad46c (diff)
downloademacs-ab8bc93cd42233c59a187b99dfb011c6fc5b86f6.tar.gz
emacs-ab8bc93cd42233c59a187b99dfb011c6fc5b86f6.zip
; Add tasks for the Android port
* etc/PROBLEMS: Improve descriptions of issues with Droid Sans Mono and Anonymous Pro. Then, bring up the subject of CFF fonts and how they relate to CJK text. * etc/TODO: Detail that CFF support is desired.
-rw-r--r--etc/PROBLEMS42
-rw-r--r--etc/TODO13
2 files changed, 46 insertions, 9 deletions
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 6fe0b93f538..265e28e5ddc 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -3353,7 +3353,7 @@ this and many other problems do not exist on the regular X builds.
3353** Text displayed in the default monospace font looks horrible. 3353** Text displayed in the default monospace font looks horrible.
3354 3354
3355Droid Sans Mono (the default Monospace font which comes with Android) 3355Droid Sans Mono (the default Monospace font which comes with Android)
3356comes with instruction code designed for Microsoft's proprietary 3356incorporates instruction code designed for Microsoft's proprietary
3357TrueType font scaler. When this code is executed by Emacs to instruct 3357TrueType font scaler. When this code is executed by Emacs to instruct
3358a glyph containing more than one component, it tries to address 3358a glyph containing more than one component, it tries to address
3359"reference points" which are set to the values of two extra "phantom 3359"reference points" which are set to the values of two extra "phantom
@@ -3398,6 +3398,11 @@ you are not seeing problems with character display, as the
3398automatically generated instructions result in superior display 3398automatically generated instructions result in superior display
3399results that are easier to read. 3399results that are easier to read.
3400 3400
3401We have been told that the default Sans font under Android 2.3.7,
3402named "Droid Sans", also exhibits this problem. The procedure for
3403repairing the font is identical to the procedure outlined above,
3404albeit with "DroidSansMono" replaced by simply "DroidSans".
3405
3401** The "Anonymous Pro" font displays incorrectly. 3406** The "Anonymous Pro" font displays incorrectly.
3402 3407
3403Glyph instruction code within the Anonymous Pro font relies on 3408Glyph instruction code within the Anonymous Pro font relies on
@@ -3407,14 +3412,15 @@ interpreter control registers after the execution of the font
3407pre-program, which sets them to a value that is perpendicular to the 3412pre-program, which sets them to a value that is perpendicular to the
3408horizontal plane of movement. 3413horizontal plane of movement.
3409 3414
3410Since Emacs does not provide this "feature", various points within 3415Since Emacs does not provide this "feature", various points inside
3411glyphs are moved vertically rather than horizontally when a glyph 3416glyphs are moved vertically rather than horizontally when a glyph
3412program later executes an "MIRP" (Move Indirect Relative Point) 3417program later executes an instruction such as "MIRP" (Move Indirect
3413instruction. 3418Relative Point) that moves and measures points along the axis
3419specified by those registers.
3414 3420
3415This can be remedied in two ways; the first (and the easiest) is to 3421This can be remedied in two ways; the first (and the easiest) is to
3416replace its instruction code with that supplied by "ttfautohint", as 3422replace its instruction code with that supplied by "ttfautohint", as
3417depicted above. The second is to patch the instruction code within 3423depicted above. The second is to patch the instruction code inside
3418the font itself, using the "ttx" utility: 3424the font itself, using the "ttx" utility:
3419 3425
3420 https://fonttools.readthedocs.io/en/latest/ttx.html 3426 https://fonttools.readthedocs.io/en/latest/ttx.html
@@ -3435,11 +3441,10 @@ then, find the end of the section labeled 'prep':
3435 </prep> 3441 </prep>
3436 3442
3437and insert the following instruction immediately before the closing 3443and insert the following instruction immediately before the closing
3438'/assembly' tag: 3444'/assembly' tag, so as to reset the interpreter control registers back
3439 3445to their default values prior to the completion of the pre-program:
3440 SVTCA[1]
3441 3446
3442(which stands for "Set Vector registers to Control Axis X") 3447 SVTCA[1] /* Set Vector registers to Control Axis X */
3443 3448
3444Then, reassemble the font from the modified XML: 3449Then, reassemble the font from the modified XML:
3445 3450
@@ -3448,6 +3453,25 @@ Then, reassemble the font from the modified XML:
3448which should produce a modified font by the name of 3453which should produce a modified font by the name of
3449Anonymous_Pro#1.ttf. 3454Anonymous_Pro#1.ttf.
3450 3455
3456** CJK text does not display in Emacs, but does in other programs.
3457
3458When inserting CJK text into a buffer or visiting a file containing
3459CJK text, Emacs often fails to locate a suitable font. This problem
3460manifests itself as hollow squares with numbers and letters within
3461being displayed in lieu of the text itself.
3462
3463The reason for this is Emacs's absence of support for OpenType fonts
3464utilizing CFF (Compact Font Format) outlines, which the CJK fonts
3465bundled with Android have been distributed as since Android 7.0.
3466
3467The solution is to install a TrueType CJK font to the user fonts
3468directory detailed in the "Android Fonts" node of the Emacs manual.
3469
3470Introducing support for the byzantine CFF font format into the Android
3471port is a large undertaking that we are looking for volunteers to
3472perform. If you are interested in taking responsibility for this
3473task, please contact <emacs-devel@gnu.org>.
3474
3451* Build-time problems 3475* Build-time problems
3452 3476
3453** Configuration 3477** Configuration
diff --git a/etc/TODO b/etc/TODO
index f097e76b917..a918f496863 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -1748,6 +1748,19 @@ The former is based on the GVFS archive backend, which makes it
1748available on GNU/Linux only. That implementation has further 1748available on GNU/Linux only. That implementation has further
1749drawbacks like it doesn't support to write into archives. 1749drawbacks like it doesn't support to write into archives.
1750 1750
1751** Provide support for CFF outlines in the Android port.
1752
1753The file src/sfnt.c supplies the font backend for the Android port.
1754It is presently a self contained TrueType scaler, implementing both a
1755grayscale outline generator and an instruction code interpreter.
1756
1757Support for CFF (Compact Font Format) outlines will facilitate
1758utilizing fonts distributed as ".otf" files, a category that currently
1759encompasses all CJK and some Middle Eastern and Indic fonts
1760distributed with Android, obviating the present requirement for users
1761of such scripts to actively install TrueType versions of fonts
1762otherwise bundled with the system.
1763
1751* Other known bugs 1764* Other known bugs
1752 1765
1753** 'make-frame' forgets unhandled parameters, at least for X11 frames 1766** 'make-frame' forgets unhandled parameters, at least for X11 frames