summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2022-04-03 14:53:14 +0800
committerMark Hung <marklh9@gmail.com>2022-04-08 15:25:37 +0200
commit257bb11cbc5b1eb1f90014f528b9e7d6ccfeae86 (patch)
tree5b1aad0787c01d86759e514ccee52e9d27fb62ba /bin
parent2b2d1c08c94fdc3982971c2b19ea241f05e578c9 (diff)
tdf#148330 fix vertical offset for DFKai-SB (ukai.ttf).
DFKai-SB (ukai.ttf) is a built-in font under tradtional Chinese Windows. The font is very common, especially for official documents. It is one of the so-called tricky fonts in FreeType[1]. DFKai-SB has incorrect extent in the glyf table[2]. It results in incorrect glyph positions in vertical writing. FreeType recalculates the extents based on the glyph outline, but LibreOffice uses Harfbuzz with built-in ot font functions instead of ft (FreeType). This patch decides if the fix is necessary by checking the family name of the font and the y-offset value, and recaculates the glyph offset based on glyph height and top bearing obtained from the glyph bound rect. [1]https://freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_face_flag_tricky [2]https://github.com/harfbuzz/harfbuzz/issues/3521 Change-Id: If632dd38c462c229837e1efb5446e2142f8f0639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132511 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions