[GRASS5] grass font

Radim Blazek Radim.Blazek at dhv.cz
Fri Jun 15 02:47:35 EDT 2001


Glynn Clements wrote:
> Somesh Agarwal wrote:
> > working on grass from last 2 weeks I have being able to figure out all
> > the nuts and bolts of how fonts  work in GRASS and willing to write a
> > README if you let me do so .
> > But I feel that present support on grass for fonts is very primitive
> > and it will restrict its growth in local markets where localization
> > is an important issue. I am trying to anable the bit map fonts (bdf) to
> > be rendered on grass . Is there any one in the list who is interested in
> > working with me ?? the idea is to rewrite the code for
> > src/display/devices/lib
> > relevant files so that we are able to write bitmap characters on the
> > display device .. any takers
>
> Note that there are currently 3 different drivers: XDRIVER (for the X
> window system), PNG (which generates a PNG file) and CELL (which
> generates a GRASS raster (cell) layer).
>
> Adding BDF/PCF font support to XDRIVER would be fairly simple; adding
> it to the other drivers less so.
>
> Another thing to bear in mind is that the current display architecture
> is, IMHO, long overdue for replacement with something more substantial.
>
> Rather than expending significant effort on the existing drivers, it
> might be better to contribute suggestions as to what functionality
> should be included in any future display architecture in order to
> support proper internationalisation.

1. quick solution 
If I understand it well, grass fonts are Hershey Fonts, which contain
many:
( can be grouped as almost 20 'occidental' (english, greek,
                cyrillic) fonts, 3 or more 'oriental' (Kanji, Hiragana,
                and Katakana) fonts, and a few hundred miscellaneous
                symbols (mathematical, musical, cartographic, etc etc) ) 
(copy form README)
but not all (Eastern European for example) needed characters in original 
distribution. 
I thing that the simplest solution for grass5.0.x, which should not bring new 
bugs, would be conversion utility from other font formats (Type1, ..) to 
Hershey Fonts format. Unfortunately I could not find such utility on the Web. 
Anybody knows about such conversion program or why conversion to Hershey
fonts is impossible? 

2. Long term solution 
Let us define requirements first. I'll try to start:

- Labels (texts in map) must be identical (realy identical - the same font    
   fonts with the same metrics) in:
   - XDRIVER
   - CELL, PNG, (and similar) drivers
   - Postscript files created by ps.map
   - all new possible clients/viewers: java, windows (not CygWin+Xfree)
Is it possible to display (effectively) exactly the same fonts on many 
platforms? Probably not. Where could we learn from - Acrobat , Ghostscript?)

- System fonts in some standard format should be used.  Fonts should not be   
   distributed in grass package.

- Vector fonts should be used. 

Please add new requrements and send your criticism. I am not fonts expert.

Glynn, is it solution for fonts so closely tied to new display architecture 
or may be this task separated? 


Radim









More information about the grass-dev mailing list