[cairo] non-ascii output
Carl Worth
cworth at cworth.org
Tue May 17 16:02:49 PDT 2005
On Mon, 16 May 2005 18:48:33 -0700, Evan Martin wrote:
> I thought cairo used fontconfig?
Cairo does use fontconfig (when using the freetype font backend).
> Is there still a layer missing?
Just a little bit of missing code. Fontconfig does the right thing in
this area. If you hand it a set of attributes by which to select a
font, it doesn't hand back a font. It always hands back all the fonts,
sorted in order with closest matching first.
> I'm passing names like "monospace" and "sans-serif" to
> cairo_select_face(), and GNOME has no trouble showing these characters
> in my terminal ("Monospace"), the character map ("Sans"), etc.
cairo_show_text is being really braindead right now and never looking
beyond the first font returned.
I would be glad to have cairo_show_text do some simple font merging by
marching through the list of returned fonts until it found one that
had the glyph of interest. And at the bottom of the search, we can
have a builtin "font" that just does the little numbered-box trick to
display the numerical unicode value.
With that builtin we can guarantee that *something* would be displayed
for every utf-8 character, even on platforms where fontconfig isn't
being used.
The fact that cairo_show_text doesn't do this yet is not a deliberate
attempt to cripple it. I even think this would be a fun little project
to work on, but I haven't had the time to do it myself.
I would be glad to accept that kind of improvement to cairo_show_text.
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050517/596f293a/attachment.pgp
More information about the cairo
mailing list