Bug 94111 - mkfontscale(1) fails to produce entries for iso8859-7 because of of wrong unicode mappings for iso8859-7 codepage
Summary: mkfontscale(1) fails to produce entries for iso8859-7 because of of wrong uni...
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/libfontenc (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Depends on:
Reported: 2016-02-12 14:02 UTC by Eugene Doudine
Modified: 2018-11-11 22:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

test code (640 bytes, text/plain)
2016-02-12 14:02 UTC, Eugene Doudine
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Doudine 2016-02-12 14:02:33 UTC
Created attachment 121708 [details]
test code

mkfontscale fails to produce iso8859-7 entries for commonly used fonts that support greek (like ms core fonts, dejavu, gnu freefont and probably others).

Produced fonts.scale contains all other codepages that are supported by font,
including suneu-greek, but not  iso8859-7.

This bug is caused by bug in libfontenc that contains errors in it's unicode mapping for the iso8859-7 (greek) encoding:

1. iso code 0xff is wrongly mapped to 0x3cf, must be unmapped
2. 0xa1 is wrongly mapped to 0x2bd, must be mapped to 0x2018
3. 0xa2 is wrongly mapped to 0x2bc, must be mapped to 0x2019

The first one is (along with 0xD2) is unassigned in the codepage.

Mappings 0xa1->0x2bd,  0xa2->0x2bd were correct for version 0.1 of 
the mapping spec, nut version 1.0 (Unicode 3.0) updated them
to 0x2018 and 0x2019 accordingly.

Please see ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT
for reference.

Code to reproduce problem with fontenc library is attached

mkfontscale(1) requires all the iso8859-7 characters to be supported
by font, so fonts that do not contain these wrong mapping are skipped
while producing fonts.scale
Comment 1 GitLab Migration User 2018-08-10 20:19:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libfontenc/issues/1.
Comment 2 Alan Coopersmith 2018-11-11 22:06:11 UTC
Thanks for the report & test case.  Proposed fix:
Comment 3 Alan Coopersmith 2018-11-11 22:06:41 UTC
Test results with proposed fix:

FontEncRecode(0xff,map)=0x0, must be 0x0
FontEncRecode(0xa1,map)=0x2018, must be 0x2018
FontEncRecode(0xa2,map)=0x2019, must be 0x2019

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.