[GRASS-dev] iconv a required dependency for using Freetype?
glynn at gclements.plus.com
Sat May 5 11:18:57 EDT 2007
Paul Kelly wrote:
> As mentioned in an earlier e-mail, I thought I'd try and see if I can get
> Freetype font support working on native Windows. Came across the error
> message below in lib/driver. As far as I can see it is because I don't
> have iconv installed, but the section of the source is only
> conditionalised on HAVE_FT2BUILD_H. I'm wondering if the bits that
> reference convert_str (which presumably does translation) could safely be
> conditionalised on HAVE_ICONV_H, or does anybody know if the
> interdependency between Freetype and iconv goes deeper than that?
d.text.freetype already handles the lack of iconv(); look at
convert_text() in d.text.freetype/main.c.
You just need a hard-coded conversion to UCS-2 for the case where
iconv() is unavailable. ISO-8859-1 -> UCS-2 (used by d.text.freetype)
is trivial; a built-in UTF-8 -> UCS-2 converter wouldn't be a lot of
Alternatively, you could use mbstowcs() to convert according to the
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev