Update of bug #67244 (group groff):
Status: Fixed => In Progress
_______________________________________________________
Follow-up Comment #9:
Sorry to be a pain but this commit has revealed a problem. We should have
heeded the warning "Beware of greek (fonts) bearing glyphs.".
The problem is linked to the design decision to use decomposed unicode as the
primary key for looking up the font table, which is essentially what the groff
fonts are. Most of the time this works fine, because the decomposed name is in
itself unique, but this is not always true. If we look at 1FBE:-
[derij@pip build (master)]$ ./UCDtest.pl 0x1fbe
$VAR1 = {
'combining' => 0,
'script' => 'Greek',
'upper' => '0399',
'decomposition' => '03B9',
'unicode10' => '',
'bidi' => 'L',
'mirrored' => 'N',
'category' => 'Ll',
'title' => '0399',
'lower' => '',
'block' => 'Greek Extended',
'decimal' => '',
'comment' => '',
'numeric' => '',
'digit' => '',
'code' => '1FBE',
'name' => 'GREEK PROSGEGRAMMENI'
};
Decomp = ι
NFD = $VAR1 = "\x{3b9}";
NFC = $VAR1 = "\x{3b9}";
D = $VAR1 = "\x{3b9}";
C = $VAR1 = "\x{3b9}";
Its decomposed name is 03B9, so if a font also contains "iota" (03B9) then
there are in fact two entries with the same key! Most of the time this is not
noticed because the glyphs are very similar - 03A9/2126 - Omega/Ohm - Ω/Ω,
but 03B9/1FBE looks like ι/ι - very different glyphs. The attached pdf
documents all the duplicate keys in the Tinos font, because we are using
decomposed rather than composed unicodes.
Grops overwrites the entry for iota when it finds PROSGEGRAMMENI, so when
preconv outputs \[u03B9] the titchy glyph is output, probably not what the
user wants!
I have just pushed a commit for gropdf, so it now protects the first entry
(since the primary glyph is normally first. This is not a proper solution, the
only proper solution is not to use decomposed names, preconv produces the
correct (unique) code groff changes it to its decomposed form which may not be
unique.
This was tested with the google Tinos fonts after using a script to change the
greek symbol names to their uXXXX counterparts.
In the pdf an "*" indicates that field 2 (width height etc..) differs, so even
if the glyph looks the same there may be subtle differences when typeset.
(file #57346)
_______________________________________________________
Additional Item Attachment:
File name: TinosDup.pdf Size: 23KiB
<https://file.savannah.gnu.org/file/TinosDup.pdf?file_id=57346>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-ef91de49e2976f6d280ab934c829bfe625128396.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67244>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
