OT: Parsing object files for fun and profit

Patrick Schluter Patrick.Schluter at bbox.fr
Thu May 31 18:53:38 UTC 2018

On Thursday, 31 May 2018 at 18:33:37 UTC, Ali Çehreli wrote:
> On 05/31/2018 09:49 AM, Adam D. Ruppe wrote:
> > Should be fairly simple to follow, just realize that the
> image is a 2d
> > block for each char and that's why there's all those
> multiplies and
> > divides.
> I remember doing similar things with fonts to add Turkish 
> characters to Digital Research and Wordperfect products (around 
> 1989-1992). Localizing by patching compiled code was fun. :)
> My happiest accomplishment was localizing Ventura Publisher 
> "cleanly" after realizing that their language-related 
> "resource" file was just an object file compiled from a simple 
> C source code which had just an array of strings in it:
> char * texts[] = {
>     "yes",
>     "no",
>     // ...
> };
> I parsed the object file to generate C source code, translated 
> the C source code, and finally compiled it again. Voila! 
> Ventura Publisher in Turkish, and everything lined-up 
> perfectly. :) Before that, one had to patch the object file to 
> abbreviate "evet" on top of "yes", "hayır" on top of "no", etc.
> Ali

Look for bdf files. This is an quite old X-windows bitmap font 
file format that has the big advantage of being a simple text 
format. So it is easy to parse and transform. There are quite 
some fonts existing in that format.


I had used it in an embedded project in the 90s and it was simple 
enough that a 80186 based terminal could handle bitmap 
proportional fonts without breaking a sweat.

More information about the Digitalmars-d-learn mailing list