Problem description: When fontconfig matches italic font, italicity is ignored. In the particular case (Hebrew) a Windows font "Guttman Adii" should be replaced by "David CLM Italic", but it is replaced by "David CLM" instead. Current behavior: see attachment Expected behavior: see attachment
Created attachment 52083 [details] Windows look, using "Guttman Adii" Regular "Guttman Adii" is used in Windows to create a doc file
Created attachment 52084 [details] Current behavior on Linux - missing font substituted by "David CLM Regular"
Created attachment 52086 [details] Expected behavior on Linux - missing font substituted by "David CLM Italic"
Created attachment 52087 [details] FontConfig config file The section <match target="pattern" > <test name="family" > <string>Guttman Adii</string> </test> <edit mode="append" binding="same" name="family" > <string>David CLM</string> </edit> <edit mode="assign" binding="same" name="slant" > <const>italic</const> </edit> </match> instructs to replace "Guttman Adii" with "David CLM Italic"
Created attachment 52525 [details] MS Word document - test case
It seems there is a regression since LibO 3.3.1: In the trunk the test file is opened with first word in David font, and the second in Times New Roman font. In LibO 3.3.1 the test file is entirely set in David.
Created attachment 52526 [details] Incomplete patch, worked for OOo This patch fixed the same issue in Open Office, but didn't cure LibO. Maybe the mentioned regression is related to this.
Looks likes its a cache, which doesn't know about the possibility of an italic/bold variant being the sub, which causes this not to work.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=3f9a28f1f704967446b411b3b7e176deeb78ca83 for the font sub problem The other .doc issue looks like a .doc import bug, might have a look at that too
and http://cgit.freedesktop.org/libreoffice/core/commit/?id=625a032f820234b0d55e44b2263c5847993dcc7d fixes the font in the .doc import again. Looks good now I think
I checked in master, it works fine now. Thanks!
Verified in 3.5.0 Beta2.