Issue 79676 - Enable glyph fallback with ATSUI
Summary: Enable glyph fallback with ATSUI
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m221
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: hdu@apache.org
QA Contact: issues@porting
URL:
Keywords: aqua
: 77566 80109 80118 (view as issue list)
Depends on:
Blocks:
 
Reported: 2007-07-17 01:57 UTC by ekato
Modified: 2007-10-16 08:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch to use font fallback (3.15 KB, text/plain)
2007-07-17 01:59 UTC, ekato
no flags Details
revised patch (3.11 KB, text/plain)
2007-07-17 03:42 UTC, ekato
no flags Details
spacing increased (67.84 KB, image/png)
2007-07-17 11:54 UTC, sparcmoz
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ekato 2007-07-17 01:57:56 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
Comment 1 ekato 2007-07-17 01:59:10 UTC
Created attachment 46844 [details]
Patch to use font fallback
Comment 2 ekato 2007-07-17 02:12:51 UTC
set keyword
Comment 3 ekato 2007-07-17 03:29:39 UTC
After some tests, sometimes the patch doesn't work at all...  I'll investigate
later.
Comment 4 ekato 2007-07-17 03:40:47 UTC
Here is the revised patch.  Please obsolete the first one.
Comment 5 ekato 2007-07-17 03:42:49 UTC
Created attachment 46845 [details]
revised patch
Comment 6 ekato 2007-07-17 03:56:02 UTC
I should have used ( eStatus == noErr ) instead of ( eStatus != noErr ) in the
first patch.  Too stupid...
Comment 7 hdu@apache.org 2007-07-17 09:53:38 UTC
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
Comment 8 hdu@apache.org 2007-07-17 10:05:03 UTC
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").
Comment 9 sparcmoz 2007-07-17 11:54:51 UTC
Created attachment 46857 [details]
spacing increased
Comment 10 sparcmoz 2007-07-17 11:55:46 UTC
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?
Comment 11 ekato 2007-07-17 13:44:46 UTC
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.
Comment 12 ekato 2007-07-27 13:53:31 UTC
*** Issue 80109 has been marked as a duplicate of this issue. ***
Comment 13 sparcmoz 2007-07-27 22:03:31 UTC
Should this patch be committed? Although there is more work, it would be allow
users testing to get past this issue.
Comment 14 sparcmoz 2007-07-27 22:07:30 UTC
*** Issue 80118 has been marked as a duplicate of this issue. ***
Comment 15 ekato 2007-07-28 04:41:05 UTC
I think we should postpone to commit the patch at this time.  It may cause a lot
of mismatch in glyph assumption.
Comment 16 hdu@apache.org 2007-09-27 17:21:03 UTC
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.
Comment 17 hdu@apache.org 2007-10-04 10:51:28 UTC
@hi: please verify in CWS aquavcl03
Note: glyph fallback for PDF export is not yet implemented
Comment 18 hdu@apache.org 2007-10-08 11:04:28 UTC
*** Issue 77566 has been marked as a duplicate of this issue. ***
Comment 19 philipp.lohmann 2007-10-08 15:07:13 UTC
verified in CWS aquavcl03
Comment 20 hdu@apache.org 2007-10-16 08:09:46 UTC
Got into SRC680_m233 => closing