[cairo] Pango issues on OSX

Andrea Canciani ranma42 at gmail.com
Thu Aug 5 11:07:29 PDT 2010


On Thu, Aug 5, 2010 at 7:01 PM, Travis Griggs <travisgriggs at gmail.com> wrote:
> I succeeded in getting Pango/Cairo compiled for OSX, without the FT/FC
> backends. But I'm seeing some interesting results. I wrote a little
> character viewer, similar to what the OSX character palette provides, and
> then put it side by side with the character palette viewer, starting at
> 0x0400 (Cyrillic block).
>
> http://tinypic.com/view.php?pic=14jt8vq&s=3
>
> I show the ghlyphs shown, simply by creating a Layout object, setting it's
> utf8 text, and giving it a font description string that looks something like
> ",20", and then using show_layout().
>
> Is there a good explanation for what's missing? Do I need to deug something
> in the library somewhere? TIA
The quartz-font backend doesn't correctly handle all of the Unicode.
In fact, I'm
really surprised you managed to get all of those non-ascii glyphs
rendered correctly.
If I were to start trying to find the culprit for that misrendering, I
would start checking
if quartz-font is actually doing the right thing.
This is at least in past a problem in the underlying API.
"Quartz provides a limited, low-level interface for drawing text. For
information on text-drawing functions, see CGContext Reference. For
full Unicode and text-layout support, use the services provided by
Core Text or ATSUI)."
To solve this we should probably use Core Text, since ATSUI has been
deprecated, but Core Text is only available since 10.5 (or maybe, even
better, have both an ATSUI and a Core Text font backend... this would
make it work both on newer and older machines).
Andrea Canciani


More information about the cairo mailing list