From: Po Lu Date: Mon, 8 Jan 2024 07:26:50 +0000 (+0800) Subject: ; * etc/PROBLEMS: Remove several resolved problems. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c946efe7b3778302cd64442b451f806f4be7e78e;p=emacs.git ; * etc/PROBLEMS: Remove several resolved problems. --- diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 4d3b236ab03..7a5f029af65 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3406,26 +3406,21 @@ this and many other problems do not exist on the regular X builds. ** Text displayed in the default monospace font looks horrible. -Droid Sans Mono (the default Monospace font which comes with Android) -incorporates instruction code designed for Microsoft's proprietary -TrueType font scaler. When this code is executed by Emacs to instruct -a glyph containing more than one component, it tries to address -"reference points" which are set to the values of two extra "phantom -points" in the glyph, that are a proprietary extension of the MS font -scaler. - -Emacs does not support these extensions, and as a result characters -such as - - ĥ - -display incorrectly, with the right most edge of the `h' component -stretched very far out to the right, on some low density displays. - -The solution is to replace the MS-specific hinting code in Droid Sans -Mono with automatically generated code from the FreeType project's -"ttfautohint" program. First, extract -'/system/fonts/DroidSansMono.ttf' from your device: +TrueType fonts incorporate instruction code executed by the font +scaler (the component responsible for transforming outlines into +bitmap images capable of being displayed onscreen), in order that +features of each glyph might be aligned to pixel boundaries +intelligently, preventing faintness while maintaining the shape of its +features. The substandard instruction code provided by the monospace +font distributed with Android misplaces features of such glyphs as "E" +and "F" between point sizes of 16 and 24, resulting in noticeable +whitespace inconsistencies with other glyphs. Furthermore, the +vertical stem in the glyph "T" is positioned too far to the left. + +The remedy for this is to replace the instruction code with +automatically generated code from the FreeType project's "ttfautohint" +program. First, extract '/system/fonts/DroidSansMono.ttf' from your +device: $ adb pull /system/fonts/DroidSansMono.ttf /system/fonts/DroidSansMono.ttf: 1 file pulled, 0 skipped. @@ -3448,85 +3443,18 @@ allowed by free versions of Android, such as Replicant): or to the user fonts directory described in the "Android Fonts" node of the Emacs manual. You may want to perform this procedure even if -you are not seeing problems with character display, as the -automatically generated instructions result in superior display -results that are easier to read. - -We have been told that the default Sans font under Android 2.3.7, -named "Droid Sans", also exhibits this problem. The procedure for -repairing the font is identical to the procedure outlined above, -albeit with "DroidSansMono" replaced by simply "DroidSans". - -** The "Anonymous Pro" font displays incorrectly. - -Glyph instruction code within the Anonymous Pro font relies on -undocumented features of the Microsoft TrueType font scaler, namely -that the scaler always resets the "projection" and "freedom" vector -interpreter control registers after the execution of the font -pre-program, which sets them to a value that is perpendicular to the -horizontal plane of movement. - -Since Emacs does not provide this "feature", various points inside -glyphs are moved vertically rather than horizontally when a glyph -program later executes an instruction such as "MIRP" (Move Indirect -Relative Point) that moves and measures points along the axis -specified by those registers. - -This can be remedied in two ways; the first (and the easiest) is to -replace its instruction code with that supplied by "ttfautohint", as -depicted above. The second is to patch the instruction code inside -the font itself, using the "ttx" utility: - - https://fonttools.readthedocs.io/en/latest/ttx.html - -First, convert the font to its XML representation: - - $ ttx Anonymous_Pro.ttf - -then, find the end of the section labeled 'prep': - - - - [...] - ROUND[01] /* Round */ - RTG[ ] /* RoundToGrid */ - WCVTP[ ] /* WriteCVTInPixels */ - - - -and insert the following instruction immediately before the closing -'/assembly' tag, so as to reset the interpreter control registers back -to their default values prior to the completion of the pre-program: - - SVTCA[1] /* Set Vector registers to Control Axis X */ - -Then, reassemble the font from the modified XML: - - $ ttx Anonymous_Pro.ttx - -which should produce a modified font by the name of -Anonymous_Pro#1.ttf. - -** The "IBM Plex Mono" font displays incorrectly. - -This problem is precipitated by an attempt to exploit the undocumented -feature of the MS font scaler explicated within the previous heading. - -Its remedy is also unsurprisingly alike the fix described there: both -patching the preprogram to reset the point movement vectors and -replacing the instruction code with code generated by "ttfautohint" -will adequately resolve the problem. +you are not experiencing problems with character display, as the +automatically generated instructions result in more legible text. ** Glyphs are missing within the "Arial" font or it does not load. -On account of its origins at Microsoft, instruction code included -within this font is awash with references to behavior specific to the -MS scaler. It is incorrigibly broken, to a degree that even -"ttfautohint" cannot repair; your only recourse is to select some -other font. - -This issue may extend beyond Arial to encompass a larger selection of -fonts designed by Microsoft. +Old versions of this font included instruction code that assumed a +degree of latitude from the Microsoft font scaler, which grants fonts +leave to address nonexistent points without aborting the scaling +process, among other invalid TrueType operations. This issue may +extend beyond Arial to encompass a larger selection of old fonts +designed by Microsoft or Monotype; most of the time, installing newer +versions of such fonts will suffice. ** Some TrueType test fonts don't work. @@ -3554,9 +3482,9 @@ Executing instruction code is not a strict requirement for producing correct display results from most current fonts. If a font's instruction code produces results that are merely unpleasing, but not incorrect, then the font was presumably not designed for Emacs's -scaler. If its uninstructed glyphs are satisfactory (such as if your -screen resolution is high to the extent that scaling artifacts prove -invisible), disable instruction code execution by appending its family +scaler. If its uninstructed glyphs are satisfactory (such as when +your screen resolution is high enough to ameliorate scaling +artifacts), disable instruction code execution by appending its family name to the variable 'sfnt-uninstructable-font-regexp', then restarting Emacs.