[cairo] About cairo_show_text and UTF-8...

Behdad Esfahbod behdad at cs.toronto.edu
Sat Jan 7 06:58:30 PST 2006


On Fri, 6 Jan 2006, Bill Spitzak wrote:

> I don't understand this. All I want is the first 0x10ffff glyph indicies
> to always draw something that has some relationship to the Unicode
> glyphs. A possible accurate definition is that they should draw the
> exact same glyph Pango would draw if given a 1-character string of only
> that index. That does not mean Pango is limited to these same glyphs. My
> recommendation is that the fontset contain alternate forms in non-unicde
> indexes above 0x10ffff, though instead Pango could just select several
> of them like it does with fonts now. And Pango can retrieve the tables
> for all the fonts from the fontset.

What are those glyphs usefule for?  Almost all writing systems
have a nontrivial unichar->glyph matching (even Latin, for
ligatures for example)

> > You *could* add fontsetting code into the Cairo toy API. That would
> > require changes to the Cairo internal interfaces, but is otherwise
> > not all that hard. But it would be entirely separate from the Pango
> > fontsetting code, other than they would both use fontconfig to
> > get the lists of fonts to combine.
>
> Please, somebody, do this, if that is the only solution.
>
> However my belief is that doing this in two places is wasteful and
> possibly dangerous. If Cairo can manage this large set of glyphs, Pango
> should be able to take advantage of it, and Pango should be able talk to
> Cairo about only a single "font", rather than having to shuffle Cairo
> fonts around. This would also allow easy mixing and migrating from the
> "toy" interface to Pango, and would encourage Pango adoption. I am also
> extremely worried that different algorithims will lead to programs
> producing different output when given the same font-name string, which
> is a big turn-off for users.

All this talks about expanding the toy api scares me seriously.
There's one true thing and that's cairo cannot renderin Arabic
and Indic text unless cairo becomes Pango.  We are not idiots
making Pango more complex than needed.  If Pango seems too compex
to you, then you are under-estimating the complexity of Unicode
text rendering.


--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
	-- Dan Bern, "New American Language"


More information about the cairo mailing list