[GRASS5] d.text2

Eric G. Miller egm2 at jps.net
Thu Aug 9 00:55:13 EDT 2001


On Thu, Aug 09, 2001 at 10:03:19AM +0900, GRASS wrote:
> Hi developers,
> 
> I've added unused/display/d.text2 module to display text using TrueType fonts.
> Could anyone test whether this works or not?
> 
> FreeType2 library is required and libgiconv or libiconv is optionally
> required to support unicode.

After making a few changes:

  1.  s/<giconv.h>/<iconv.h>
  2.  Comment out CHARSET handling [*]
  3.  Edit hardcoded default font path to one I have...
  4.  Edit Gmakefile, remove -lgiconv
        -- Note, apparently "iconv" is built into GNU libc these days.
	   I think this is a recent change.

  Runs to completion, but there's nothing on the monitor ;(  Tried with
  color "red" and default, and size=100 and default.

  I uncommented the debugging glyph.width/height printf() call, and see
  it is translating the characters.  So, maybe a problem with the color?

  I didn't do a full rebuild of GRASS sources (using that april_...
  tag), so maybe I missed some important change?

*  I tried both "en_US" and "8859-1" (not sure what is correct)
   When building, got a warning for wrong pointer type for arg2 to
   iconv.

I think it is a worthy endeavor.  I'm not clear on how X4 handles fonts
these days, but I get the impression that it might be possibly to just
use truetype fonts directly without needing explicit linkage to
freetype.  I think the monitor code would have to change for this to
work though (it could do the work on it's end for making appropriate X
calls -- then we could ditch those hershey fonts).

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-dev mailing list