Blog
Scribe and LgiRes Bugs
Date: 22/3/2005
Firstly, I've just fixed a rather interesting bug in Lgi that is almost humorous in it's simplicity. Lgi doesn't glyph substitution when displaying text that can't be displayed in the current font by using characters (glyphs) from another font installed on the system. This means maintaining lookup tables of characters and what font you can find them in. Now I implemented that as a table for every unicode char I wanted to map (0 -> 0xffff) of bytes (64kb) that hold an index into a font cache (0 -> 255). And immediately you can see what my problem was... "what happens when there is more than 256 fonts in the system?". Crash bang splat.

Now for the moment I've just limited the search through fonts to stop when it runs out of table space. But ultimately I'd like to make it handle the full unicode range as well as more than 256 fonts. But that would cost more memory so I'm trying to think of a better solution. Increasing the unicode character index size from 8 bits up to say 10 bits might fix the font limitation but add increased overhead into the glyph sub code to set/get non byte aligned bits of memory. Supporting the whole unicode range for just 256 fonts (8 bit indexes) would be about 1 MB... which is a lot of memory to sacrifice for this feature. Thoughts and suggestions are welcome.

On another note, LgiRes has a new version out to cope with the new Scribe lr8 format. But it crashes on Win9x/ME. If you'd like to help, download this and unzip it into a v1.80 install. Run (and crash) LgiRes and gather any .txt files it creates and send them to me. The Scribe lr8 file has been getting corrupted utf-8 strings, and the new version of LgiRes does some consistancy checking. If you intend to do some translation work I suggest waiting for the next build of Scribe (test8) and LgiRes and using that as a base for your work, because I've fixed all (most?) of the corrupted strings in the lr8 file.
Comments:
fret
22/03/2005 1:37pm
After spending way too much time installing Windows 98 SE in Vmware, and setting up my build environment I've got to the bottom of the LgiRes crash.

So I'll post a new build tomorrow.
fret
22/03/2005 1:44pm
I think if you have all the characters covered by at least one font in your system LgiRes won't crash. The fact it crashes in '98 more readily is just reflective of the much smaller coverage of the unicode character set than say XP.

The layout code for glyph sub would get confused when no font has a given input character.
fret
22/03/2005 9:32pm
I've released LgiRes v1.81 with hopefully a fix for the crash people have been seeing.
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]