Apache OpenOffice (AOO) Bugzilla – Issue 79676
Enable glyph fallback with ATSUI
Last modified: 2007-10-16 08:09:46 UTC
Currently, glyphs not displayed with selected fonts are displayed with white box. Here is the patch to use font fallback object with kATSUDefaultFontFallbacks search methods. See http://developer.apple.com/documentation/Carbon/Conceptual/ATSUI_Concepts/atsui_chap6/chapter_6_section_2.html
Created attachment 46844 [details] Patch to use font fallback
set keyword
After some tests, sometimes the patch doesn't work at all... I'll investigate later.
Here is the revised patch. Please obsolete the first one.
Created attachment 46845 [details] revised patch
I should have used ( eStatus == noErr ) instead of ( eStatus != noErr ) in the first patch. Too stupid...
Thanks for the patch! It is a good start to attack the problem. There are some additional things that need to considered: - though the relationsships between different fonts are available in vcl's OutputDevice layer this info isn't used in the current patch. So it could easily happen that e.g. Arial falls back to Schoolhouse, which is a horrible mismatch - font attributes don't work, e.g. an artificially emboldened Zapfino could fall back to an already bold Arial which would get an artificial artificial emboldening - the method AtsLayout::GetNextGlyphs() doesn't work correctly anymore because of the unexpected font changes and since glyphids are font specific, so PDF export becomes corrupted
To clarify and extend my previous comment: > ... artificial artificial emboldening I meant additional artificial emboldening I also changed the summary to mention "glyph fallback", as this is OOo's name of the this feature which is also used on the other ports. OOo has the name "font fallback" already reserved for finding the best matching available font for a non-available font mentioned in a document (e.g. from "Liberation Sans" to "Arial").
Created attachment 46857 [details] spacing increased
Please see attached screenshot - built with the second patch in m220. When a full stop (period) is added at the end of a line, then the spacing between characters is increased. Should I make a new issue for this?
sparcmoz: Thanks for your report. I can confirm this issue. I think this may be related to kerning of Hiragino Gothic/Mincho fonts, and it is not totally related to the glyph fallback. Please file a new issue.
*** Issue 80109 has been marked as a duplicate of this issue. ***
Should this patch be committed? Although there is more work, it would be allow users testing to get past this issue.
*** Issue 80118 has been marked as a duplicate of this issue. ***
I think we should postpone to commit the patch at this time. It may cause a lot of mismatch in glyph assumption.
I applied the patch to CWS aquavcl03. @ekato: thank you for the patch I still don't have a solution for the PDF export problem for the glyph fallback case. To prevent fallbacks to symbol fonts or other unexpected fallbacks the feature was adjusted so that "normal" fonts are prefered if possible.
@hi: please verify in CWS aquavcl03 Note: glyph fallback for PDF export is not yet implemented
*** Issue 77566 has been marked as a duplicate of this issue. ***
verified in CWS aquavcl03
Got into SRC680_m233 => closing