[GRASS-dev] [grass-code P][294] make GRASS fonts not endian-specific

code P item #294, was opened at 2007-02-14 15:33
Status: Open
Priority: 3
Submitted By: William Kyngesburye (kyngchaos)
Assigned to: Nobody (None)
Summary: make GRASS fonts not endian-specific
Patch status: None
Patch type: enhancement
GRASS component: GRASS wide
GRASS version: CVS HEAD
GRASS CVS checkout date, if applies (YYMMDD): 070212

Initial Comment:
This is mainly concerned with Mac OS X, but can be applied to all platforms without harm. The problem is a OS X universal binary, that has combined binaries for both PPC and Intel Macs. The font files are built at compile time for the architecture they are built on, and thus can't be used on the other arch.

I suggest picking one arch, or endian, for the font files on all platforms. These patches are little-endian, since that's the arch I build on.

First, during compilation, the lib/fonts target must build the fonts for one architecture, and byte swap the output if on the opposite arch (I took the byte-swapping from the nad loading code in PROJ). This patch is for lib/fonts/for_grass/splitfont.c.

Then, lib/driver/font2.c needs to always read this arch.

No other changes in the make system are needed.

The font files are small enough that the extra processing time to byte-swap on loading them shouldn't adversly impact GRASS' performance.

If this is something that could also be backported to 6.2, that would be great.

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=205&aid=294&group_id=21