diff options
| author | Po Lu | 2023-08-17 10:03:49 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-17 10:04:47 +0800 |
| commit | ab8bc93cd42233c59a187b99dfb011c6fc5b86f6 (patch) | |
| tree | 691146f0c93c7647311bdce12f86aac17c1bb606 | |
| parent | f38bcf37dc47ce172c985d1c621df3583eaad46c (diff) | |
| download | emacs-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/PROBLEMS | 42 | ||||
| -rw-r--r-- | etc/TODO | 13 |
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 | ||
| 3355 | Droid Sans Mono (the default Monospace font which comes with Android) | 3355 | Droid Sans Mono (the default Monospace font which comes with Android) |
| 3356 | comes with instruction code designed for Microsoft's proprietary | 3356 | incorporates instruction code designed for Microsoft's proprietary |
| 3357 | TrueType font scaler. When this code is executed by Emacs to instruct | 3357 | TrueType font scaler. When this code is executed by Emacs to instruct |
| 3358 | a glyph containing more than one component, it tries to address | 3358 | a 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 | |||
| 3398 | automatically generated instructions result in superior display | 3398 | automatically generated instructions result in superior display |
| 3399 | results that are easier to read. | 3399 | results that are easier to read. |
| 3400 | 3400 | ||
| 3401 | We have been told that the default Sans font under Android 2.3.7, | ||
| 3402 | named "Droid Sans", also exhibits this problem. The procedure for | ||
| 3403 | repairing the font is identical to the procedure outlined above, | ||
| 3404 | albeit with "DroidSansMono" replaced by simply "DroidSans". | ||
| 3405 | |||
| 3401 | ** The "Anonymous Pro" font displays incorrectly. | 3406 | ** The "Anonymous Pro" font displays incorrectly. |
| 3402 | 3407 | ||
| 3403 | Glyph instruction code within the Anonymous Pro font relies on | 3408 | Glyph instruction code within the Anonymous Pro font relies on |
| @@ -3407,14 +3412,15 @@ interpreter control registers after the execution of the font | |||
| 3407 | pre-program, which sets them to a value that is perpendicular to the | 3412 | pre-program, which sets them to a value that is perpendicular to the |
| 3408 | horizontal plane of movement. | 3413 | horizontal plane of movement. |
| 3409 | 3414 | ||
| 3410 | Since Emacs does not provide this "feature", various points within | 3415 | Since Emacs does not provide this "feature", various points inside |
| 3411 | glyphs are moved vertically rather than horizontally when a glyph | 3416 | glyphs are moved vertically rather than horizontally when a glyph |
| 3412 | program later executes an "MIRP" (Move Indirect Relative Point) | 3417 | program later executes an instruction such as "MIRP" (Move Indirect |
| 3413 | instruction. | 3418 | Relative Point) that moves and measures points along the axis |
| 3419 | specified by those registers. | ||
| 3414 | 3420 | ||
| 3415 | This can be remedied in two ways; the first (and the easiest) is to | 3421 | This can be remedied in two ways; the first (and the easiest) is to |
| 3416 | replace its instruction code with that supplied by "ttfautohint", as | 3422 | replace its instruction code with that supplied by "ttfautohint", as |
| 3417 | depicted above. The second is to patch the instruction code within | 3423 | depicted above. The second is to patch the instruction code inside |
| 3418 | the font itself, using the "ttx" utility: | 3424 | the 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 | ||
| 3437 | and insert the following instruction immediately before the closing | 3443 | and insert the following instruction immediately before the closing |
| 3438 | '/assembly' tag: | 3444 | '/assembly' tag, so as to reset the interpreter control registers back |
| 3439 | 3445 | to 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 | ||
| 3444 | Then, reassemble the font from the modified XML: | 3449 | Then, reassemble the font from the modified XML: |
| 3445 | 3450 | ||
| @@ -3448,6 +3453,25 @@ Then, reassemble the font from the modified XML: | |||
| 3448 | which should produce a modified font by the name of | 3453 | which should produce a modified font by the name of |
| 3449 | Anonymous_Pro#1.ttf. | 3454 | Anonymous_Pro#1.ttf. |
| 3450 | 3455 | ||
| 3456 | ** CJK text does not display in Emacs, but does in other programs. | ||
| 3457 | |||
| 3458 | When inserting CJK text into a buffer or visiting a file containing | ||
| 3459 | CJK text, Emacs often fails to locate a suitable font. This problem | ||
| 3460 | manifests itself as hollow squares with numbers and letters within | ||
| 3461 | being displayed in lieu of the text itself. | ||
| 3462 | |||
| 3463 | The reason for this is Emacs's absence of support for OpenType fonts | ||
| 3464 | utilizing CFF (Compact Font Format) outlines, which the CJK fonts | ||
| 3465 | bundled with Android have been distributed as since Android 7.0. | ||
| 3466 | |||
| 3467 | The solution is to install a TrueType CJK font to the user fonts | ||
| 3468 | directory detailed in the "Android Fonts" node of the Emacs manual. | ||
| 3469 | |||
| 3470 | Introducing support for the byzantine CFF font format into the Android | ||
| 3471 | port is a large undertaking that we are looking for volunteers to | ||
| 3472 | perform. If you are interested in taking responsibility for this | ||
| 3473 | task, please contact <emacs-devel@gnu.org>. | ||
| 3474 | |||
| 3451 | * Build-time problems | 3475 | * Build-time problems |
| 3452 | 3476 | ||
| 3453 | ** Configuration | 3477 | ** Configuration |
| @@ -1748,6 +1748,19 @@ The former is based on the GVFS archive backend, which makes it | |||
| 1748 | available on GNU/Linux only. That implementation has further | 1748 | available on GNU/Linux only. That implementation has further |
| 1749 | drawbacks like it doesn't support to write into archives. | 1749 | drawbacks like it doesn't support to write into archives. |
| 1750 | 1750 | ||
| 1751 | ** Provide support for CFF outlines in the Android port. | ||
| 1752 | |||
| 1753 | The file src/sfnt.c supplies the font backend for the Android port. | ||
| 1754 | It is presently a self contained TrueType scaler, implementing both a | ||
| 1755 | grayscale outline generator and an instruction code interpreter. | ||
| 1756 | |||
| 1757 | Support for CFF (Compact Font Format) outlines will facilitate | ||
| 1758 | utilizing fonts distributed as ".otf" files, a category that currently | ||
| 1759 | encompasses all CJK and some Middle Eastern and Indic fonts | ||
| 1760 | distributed with Android, obviating the present requirement for users | ||
| 1761 | of such scripts to actively install TrueType versions of fonts | ||
| 1762 | otherwise 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 |