mirror of https://github.com/koreader/koreader
cre: setFontFace(): increase bias given to the main font
Solve the issue when a font without bold and italic variants is used as the default font (e.g. FreeSerif), and the style tweak "Ignore publisher font-family" is used (which uses a trick to cancel any font-family by requesting a font named "NoSuchFont"): When text is italic or bold, any of the registered fonts which have a real italic or bold variant would win over our default font, as the best substitute to NoSuchFont-Italic. This gives our default font a bit more bias so it can win in its scoring against the other fonts, and be rendered as fake italic or fake bold - which will ensure consistent font and line height. (A bit hacky, but no alternative solution found.)pull/5906/head
parent
182dc60e00
commit
fa6fed8569
Loading…
Reference in New Issue