View Full Version : Font Silo format
pruss
11-06-2004, 06:07 PM
1. Is the Font Silo font format documented somewhere?
2. If not, does the no-reverse-engineering clause of the ISiloX license prohibit trying to figure out the format from a Font Silo font .pdb (not of course by decompiling or anything like that, but simply by looking at output).
Thanks!
Alexander Pruss
Voltage Spike
11-06-2004, 06:27 PM
Wow! The Alexander Pruss posting here? I bet I can guess why he is interested. ;)
Unfortunately, I cannot answer your question. To the developers, though, I say help him out. iSilo Fonts have worked quite well for me (even if they are only bitmaps), and I would hate to see the development of yet another font format for the Palm when the iSilo Font could have been the standard.
iSilo
11-06-2004, 09:09 PM
The Font Silo format is not documented either externally or internally, but here are the relevant structure definitions that may help you out:
//////////////////////////////////////////////////////////////////////
// Font Silo font
//////////////////////////////////////////////////////////////////////
// Global header - Record 0
// wType
#define FONTSILO_TYPE_CP1252_SET 0x0000
// Each record consists of a font in one size/style
// byFamily
#define FONTSILO_FAMILY_SANS_SERIF 0x00
#define FONTSILO_FAMILY_MONOSPACE 0x01
#define FONTSILO_FAMILY_SERIF 0x02
#define FONTSILO_FAMILY_CURSIVE 0x03
#define FONTSILO_FAMILY_FANTASY 0x04
// byDisplay
#define FONTSILO_DISPLAY_MONOCHROME 0x00
typedef struct tagFONTSILO_GHDR
{
WORD wHdrSize; // 00: Structure size, inclusive
WORD wType; // 02: Font set type
WORD wFlags; // 04: Flags
BYTE byFamily; // 06: Font family
BYTE byDisplay; // 07: Font display type
WORD wFontCount; // 08: Number of fonts
WORD wFirstChar; // 0A: First character
WORD wLastChar; // 0C: Last character
// 0E:
} PACKED_STRUCT FONTSILO_GHDR_T, *PFONTSILO_GHDR;
// Following the global header is the index of fonts in the set
#define FONTSILO_STYLE_PLAIN 0x00
#define FONTSILO_STYLE_BOLD 0x01
#define FONTSILO_STYLE_ITALIC 0x02
#define FONTSILO_STYLE_BOLD_ITALIC 0x03
typedef struct tagFONTSILO_SIZESTYL
{
BYTE bySize; // 00: Font size in points
BYTE byStyle; // 01: Font style
BYTE byAscent; // 02: Ascent
BYTE byDescent; // 03: Descent
// 04:
} PACKED_STRUCT FONTSILO_SIZESTYL_T, *PFONTSILO_SIZESTYL;
typedef struct tagFONTSILO_HDR
{
WORD wHdrSize; // 00: Structure size, inclusive
FONTSILO_SIZESTYL_T stSizeStyle; // 02: Size/style
BYTE byWidth; // 06: Maximum width
BYTE byHeight; // 07: Ascent plus descent
WORD wRowWords; // 08: Row width of bit image
// 0A:
} PACKED_STRUCT FONTSILO_HDR_T, *PFONTSILO_HDR;
// Let wChar be the value of the character to retrieve.
// Its image width is given by:
//
// awOffset[wChar - wLastChar + 1] - awOffset[wChar - wLastChar]
//
// However, if awOffset[wChar - wLastChar + 1] is zero, then
// iterate until awOffset[i] is non-zero.
//
// The width of the undefined character is given by:
//
// awOffset[wLastChar - wFirstChar + 2] -
// awOffset[wLastChar - wFirstChar + 1]
//
// WORD awOffset[wLastChar - wFirstChar + 3];
// WORD awImage[byHeight][wRowWords];
The rest should be relatively straightforward by examining the font files generated by iSiloX.
pruss
11-08-2004, 05:39 PM
Wow! The Alexander Pruss posting here? I bet I can guess why he is interested. ;)
Unfortunately, I cannot answer your question. To the developers, though, I say help him out. iSilo Fonts have worked quite well for me (even if they are only bitmaps), and I would hate to see the development of yet another font format for the Palm when the iSilo Font could have been the standard.
I'm making a program that converts any non-antialiased bitmapped fonts for use with Fonts4OS5. It currently supports all the PalmOS formats (afnx/nfnt/NFNT) in a number of different packagings (fontbucket, fonthack for OS4, Plucker, PalmBible+, OS's built-in Latin Locale module, Sony small font module, etc.) It would be nice to let it read Font Silo font files. The information provided (thank you so much! it's exactly what I need if I decide to go this route) will let me do that if I have the patience to do this, but on the other hand there aren't that many (any?) Font Silo fonts in the wild.
Theoretically, it would be possible to modify the utility to create Font Silo font files, too, which might be nice, but since I'm not an iSilo user (I have a registered copy of 3.x, but right now I only use it for one document--"How to tie a tie" (don't laugh too hard!)).
Voltage Spike
11-08-2004, 08:49 PM
but on the other hand there aren't that many (any?) Font Silo fonts in the wild.
While true, this situation may be a result of convenience. If you have iSiloX for Windows (which is probably the most popular client for converting iSilo documents), then you also have an easy-to-use interface for creating Font Silo fonts from commercial (i.e., non-distributable) fonts.
You should find some "wild" fonts on mobileread.com (back then it was still turcic.com) where users posted their favorite conversions when iSilo first gained this ability. The varying configurations (e.g., device-specific DPI, including pre-converted italic/bold configurations) generally means that few people are truly happy with someone else's conversion, though.
Just for the record, I use iSilo Fonts because the bitmapped (i.e., not calculated) bold and italic (especially italic) font variants look much better than the Palm-computed result. Since the Palm OS does not, as far as I know, support bitmapped italic fonts, that is a big disadvantage that you would immediately notice.
I would be interested to see what you think. I was never able to create FontBucket fonts that were the same quality as the Font Silo format (DPI issues, maybe?). I also used your palmfontconv program at one point, and I either couldn't figure out how to group font variants together or iSilo support was lacking in some manner.
pruss
11-09-2004, 06:52 AM
I would be interested to see what you think. I was never able to create FontBucket fonts that were the same quality as the Font Silo format (DPI issues, maybe?).
A lot of the FontBucket fonts I've downloaded from the FontBucket site also have poor vertical metrics (in fact, they have header.ascender = header.descender = 0), unnecessary white space above and below glyphs, as well as very poor kerning.
I also used your palmfontconv program at one point, and I either couldn't figure out how to group font variants together or iSilo support was lacking in some manner.
No iSilo support. :-(
The command-line tools, though, do let you generate fonts in FontHack format which iSilo can read, but why bother since I expect iSiloX does a better job. (The main use of palmfontconv is antialiased fonts, which iSilo doesn't support as far as I know.)
Alex
Voltage Spike
11-09-2004, 10:27 AM
No iSilo support. :-(
I guess my use was ambiguous. I meant iSilo support for other font formats, not palmfontconv support for iSilo. :-)
The main use of palmfontconv is antialiased fonts, which iSilo doesn't support as far as I know.
Not yet, but I would love to be able to use those fonts (if, that is, someone can sort out the problem of altering text colors).
pruss
11-09-2004, 05:30 PM
Not yet, but I would love to be able to use those fonts (if, that is, someone can sort out the problem of altering text colors).
Since Plucker 1.8 lets you have colored antialiased text, iSilo should be able to do it. I might even be able to sublicense Plucker's code for this, since I wrote almost all of that part of the code.
Voltage Spike
11-09-2004, 06:12 PM
Since Plucker 1.8 lets you have colored antialiased text
I humbly apologize for besmirching Plucker's good name, then. ;)
pruss
11-10-2004, 07:03 AM
The converter is released!
http://www.zlthemes.com/ProductDetailListing.php?PID=75
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.