Re: Using the Symbol font with pango



On Tue, 29 Nov 2005, [ISO-8859-15] Timothée Lecomte wrote:

> Dear Pango specialists,
>
> I am writing a rendering terminal for gnuplot, a scientific plotter. I
> use Cairo for drawing, and Pango to manage text. I would like to use the
> Symbol font with its conventionnal mapping, as it is the common way to
> display mathematic characters under gnuplot currently.
>
> However, if I simply choose the Symbol font and try to draw the
> characters, I don't get the desired output. Under Linux (gtk2.8, pango
> 1.10.1, cairo 1.0.2), I get expected Symbol output for characters for up
> to 128 (ie greek characters) and default font for others, and under
> Windows (pango 1.10.1, cairo 1.0.2) I don't get any Symbol output but
> default font.

Are you converting from an 8bit encoding to UTF-8 properly?
Pango doesn't accept invalid UTF-8 at all.


> I understand that Pango is based on unicode, and that the Symbol font
> doesn't respect unicode. I would be pleased to have help regarding this.

There was a bug open for this, but I cannot find it now.


> As far as I understand, I could write something like a conversion
> function to replace iso-8859-1 characters (usual input from gnuplot) by
> corresponding unicode characters using a map like the one provided here :
> http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/SYMBOL.TXT
>
> Another solution could be to use a custom PangoFcDecoder, but I must
> admit that I don't understand everything about it. Moreover, if it's
> based on Fontconfig, will it also work under Windows ?

Don't know.  Probably now.

> Is there a more straightforward solution ?
>
> Thanks for your help !

--behdad
http://behdad.org/

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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]