Bug 107546 - Font problem with ASCII 32 (space key)
Summary: Font problem with ASCII 32 (space key)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.2.2 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-01 14:45 UTC by Ekkehard May
Modified: 2023-01-16 17:29 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Picture shows the font problem (174.98 KB, image/jpeg)
2017-05-01 14:47 UTC, Ekkehard May
Details
Screenshot of AbiWord showing the same issue (189.27 KB, image/png)
2017-05-01 22:09 UTC, ⁨خالد حسني⁩
Details
Screenshot AbiWord 2.9.4 for Windowsm correct rendering (97.63 KB, image/jpeg)
2017-05-01 22:40 UTC, Ekkehard May
Details
Screenshot Indesign 7.5 correct rendering (63.47 KB, image/jpeg)
2017-05-02 10:30 UTC, Ekkehard May
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ekkehard May 2017-05-01 14:45:50 UTC
Description:
Problem with a Font
Font: Chess Alpha
Source (Freeware Font): http://www.enpassant.dk/chess/downl/alpha.zip

Error description

Several chess fonts are using ASCII 32 for printing the white squares of a chess diagram.
I discovered that i get a problem with the font "Chess Alpha". The white squares are too small, they have the width of a normal blank character, but not the width of the black square and the other figurines.

This problem occurs only with OpenOffice and LibreOffice.
I tested with MS Word in (several versions), MS WordPad, SoftMaker FreeOffice, AbiWord, Scribus: no broblem with the white square there.

Font: Chess Alpha
Source (Freeware Font): http://www.enpassant.dk/chess/downl/alpha.zip

Kind regards,

Ekkehad May  

Steps to Reproduce:
1. Use Font "Chess Alpha"
2. Use space key (= white square)
3. Use "+" key (= black square)
4. Repeate 3. and 4.

Actual Results:  
The chess diagrams are not displayed correctly.
The white squares are too small.

Expected Results:
The white squares should have the same width as the black squares and the figurines.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Ekkehard May 2017-05-01 14:47:47 UTC
Created attachment 132986 [details]
Picture shows the font problem
Comment 2 ⁨خالد حسني⁩ 2017-05-01 21:15:30 UTC
The font is really broken. It provides a symbol “cmap” subtable that does not have a mapping for space character. Since the font does not support the space character as far as we are concerned we use a fallback font for it, and it will most likely have a different width.

I don’t know how other office applications are handling this, one possible explanation is that they are not doing any font fallback for fonts with symbol “cmap” subtable, which in turn will cause them to use the glyph for unsupported characters (glyph 0) which happens to be a white (empty) square in this font. This also why this font works in Scribus since it does not do any fallback for missing characters. I tried AbiWord but it gave me similar rendering as LibreOffice.
Comment 3 Ekkehard May 2017-05-01 21:48:52 UTC
(In reply to Khaled Hosny from comment #2)
> The font is really broken. It provides a symbol “cmap” subtable that does
> not have a mapping for space character. Since the font does not support the
> space character as far as we are concerned we use a fallback font for it,
> and it will most likely have a different width.
> 
> I don’t know how other office applications are handling this, one possible
> explanation is that they are not doing any font fallback for fonts with
> symbol “cmap” subtable, which in turn will cause them to use the glyph for
> unsupported characters (glyph 0) which happens to be a white (empty) square
> in this font. This also why this font works in Scribus since it does not do
> any fallback for missing characters. I tried AbiWord but it gave me similar
> rendering as LibreOffice.

I tested the font "Chess Alpha" with the Software AbiWord 2.9.4, no problems there.
Comment 4 ⁨خالد حسني⁩ 2017-05-01 22:09:09 UTC
(In reply to Ekkehard May from comment #3)
> I tested the font "Chess Alpha" with the Software AbiWord 2.9.4, no problems
> there.

I tested with AbiWord 3.0.2 on Linux.
Comment 5 ⁨خالد حسني⁩ 2017-05-01 22:09:55 UTC
Created attachment 132994 [details]
Screenshot of AbiWord showing the same issue
Comment 6 Ekkehard May 2017-05-01 22:40:16 UTC
Created attachment 132996 [details]
Screenshot AbiWord 2.9.4 for Windowsm correct rendering
Comment 7 ⁨خالد حسني⁩ 2017-05-02 00:46:16 UTC
(In reply to Ekkehard May from comment #6)
> Created attachment 132996 [details]
> Screenshot AbiWord 2.9.4 for Windowsm correct rendering

I assume AbiWord on Windows is using Uniscribe somehow, so it would be getting the same rendering as other Windows applications. It would be interesting to test Firefox/Chrome/InDesign etc. since these have their own layout engines.
Comment 8 Ekkehard May 2017-05-02 10:29:34 UTC
I tested with InDesign 7.5 and there are no rendering problems.

Now i checked the "Space" glyph in the font "Chess Alpha" with FontCreator.

In the "Properties", Register "Mappings" i found this:
Platforms: "Microsoft Symbol"
Encoding format: "Segment mapping to delta values"
And in the mapping table there is a long list of mappings for the glyph:

Value     Characte Name
$F020     <$F020>
$F02A     <$F02A>
...etc.

Another Chess font, "Chess Berlin" [from the same author] is rendered correctly by LibreOffice and by OpenOffice
I checked this font with FontCreator, and the only difference i found is, that in the mapping table for the glyph "Space" there is only ONE mapping:

Value     Characte Name
$F020     <$F020>

Now i deleted all mappings in font "Chess Alpha", except the first mapping, and saved the font under a new name.
After i deletes the original font and replaced it with the modified one, OpenOffice rendered the white square correctly, but LibreOffice did not.

I'm confused.
Comment 9 Ekkehard May 2017-05-02 10:30:17 UTC
Created attachment 133005 [details]
Screenshot Indesign 7.5 correct rendering
Comment 10 QA Administrators 2018-05-03 02:42:06 UTC Comment hidden (obsolete)
Comment 11 ⁨خالد حسني⁩ 2019-08-21 20:55:50 UTC Comment hidden (obsolete)
Comment 12 ⁨خالد حسني⁩ 2023-01-16 17:29:27 UTC
I’m trying to revisit this issue, but I can not reproduce anymore, can anyone else reproduce?