[GRASS5] dxf imports

Glynn Clements glynn.clements at virgin.net
Tue Dec 18 23:40:51 EST 2001


Eric G. Miller wrote:

> > > I think Grass lacks a "d.text" function, and probably a better support
> > > for fonts. the best would be a support for TrueType fonts, usable on
> > > both Unix and Windows.
> > 
> > Are there many (any?) free TrueType fonts available?
> 
> Yes/No.  Depends on the use of free.  You can download basic TrueType
> fonts from MicroSoft, and there are lots of crappy free fonts the
> can be downloaded and used at no cost.  There's also a few fonts
> out of the OpenOffice/StarOffice package that are now available
> separately.  Distribution of a lot of "free" fonts is often restricted...

A reasonable definition of free might be "could be distributed with
GRASS". I think that there should be a minimum set which can be
included in the distribution (ideally including one for Greek) so that
scripts and examples don't need to be modified for the user's system.

There's also the issue that the font's licensing terms may be
propagated into any image or hardcopy which contains that font,
affecting the terms under which the user can licence their output. 

> > The existing font mechanism may be primitive, but it does provide a
> > high degree of portability. No additional fonts are required, and it
> > can be made to work on any device which can draw lines.
> 
> Yes, but those fonts aren't very pretty either.

As vectors, they're likely to be significantly less ugly than a
bitmapped font when scaled.

> Also, who even understands
> the binary format used in GRASS?  I've looked at that code that converts
> the original fonts to something, but I've no idea what...

The binary format is trivial. The file starts with an array containing
the offset of each character's definition. Each character is a 32-bit
integer count followed two arrays of <count> bytes; the first is the X
coordinates, the second is the Y coordinates.

> I'd propose supporting X bitmapped, PostScript, and TrueType fonts.
> The rasterizers already exist and it'd open up a lot of possibilities.
> 
> BTW: I have a partly completed set of Cartographic Map Symbols as
> a PostScript font.  It'd be nice to be able to use such things for
> display and PostScript map output.  

Well, PostScript remains a strong candidate for a future display
architecture. It also solves the availability issue; high-res fonts
come with the printer, low-res fonts are free (from X11).

However, that's for the future. In the meantime, I'd like to avoid
users being forced to choose between buying fonts or having to put up
with scaled bitmaps.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list