![]() |
|
|
#27 | |
|
Архивный участник
Join Date: Feb 2006
Posts: 158
|
Hmmm..
Glyph file structure really simple, but slightly different from Aysen's description. I'll try to describe it in comparison. First look here. Quote:
.gly file: HEADER CHARSET [, CHARSET [...] ] CHARSET: FIRST_CHARACTER CHARACTERS_COUNT GLYPH [, GLYPH [...]] 12 bytes of glyph HEADER starts from beginning: 0x00: 4 bytes texture width (1024 = 0x00000400) 0x04: 4 bytes texture height (128 = 0x00000080) 0x08: 4 bytes charsets count (1 for LargeFont-e, 2 or more to describe national character sets: first set for ASCII characters, and 2..n for UNICODE symbols) That's all for header. Next, we have only "count" of "character sets". Each character set starts immediately after end of previous block. Let's take a look in CHARSET structure. It also begins with 8 bytes header: +0x00: 4 bytes FIRST_CHARACTER code (i.e. 0x0020 for Space character, 0x0410 for Cyrillic Capital Letter A, etc.) +0x04: 4 bytes CHARACTERS_COUNT (96 for printable ASCII set (95 used in LargeFont-e), 64 (32*2) for restricted cyrillic set) Charset header follows with array of GLYPH descriptions. Each 16 bytes GLYPH descriptor contains: +0x00: 4 bytes x coorginate (0xFFFFFFFF to indicate zeroes!) +0x04: 4 bytes glyph width +0x08: 4 bytes y coordinate (0xFFFFFFFF to indicate zeroes!) +0x0C: 4 bytes glyph height File ends with some "tail". His structure unknown, but dummy copy+paste from other glyph works well for me. It depends only from NWindow.dll version, I think now. |
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|