https://bugs.documentfoundation.org/show_bug.cgi?id=161820

--- Comment #7 from ⁨خالد حسني⁩ <kha...@libreoffice.org> ---
I think it is partly a font problem, and partly a LibreOffice problem. When the
string is composed entirely from Common characters (i.e. characters that do not
belong to a specific script, numbers here), LibreOffice can not detect what
script these characters belong to and what OpenType script to enable, so uses
“DFLT” script. However, the font registers the lnum feature only for “latn”
script, so the feature does not get applied. When there is a Latin letter,
LibreOffice will correctly use “latn” script for the whole string.

This can be reproduced with hb-shape command line tool. If I don’t specifically
set a script (it will guess “DFLT”), the feature has no effect:

$ hb-shape ZillaSlab-Regular.ttf 10 --features=+lnum
[uni0031=0+385|uni0030=1+576]

When I explicitly set “latn” script, the feature gets applied:

$ hb-shape ZillaSlab-Regular.ttf 10 --features=+lnum --script=latn
[uni0031.pnum_lnum=0+374|uni0030.pnum_lnum=1+573]

I’d consider this a font bug, and it probably affects other applications.

LibreOffice can possibly be improved here, by consulting the language if no
script can be detected.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to