Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!spool.mu.edu!munnari.oz.au!manuel!ccadfa!prolix!dac From: dac@prolix.pub.uu.oz.au (Andrew Clayton) Newsgroups: comp.sys.amiga.programmer Subject: Re: Here's an EASY one for you [Character Set Interpretation] Message-ID: <18ff3ea3.ARN19d9@prolix.pub.uu.oz.au> Date: 16 Apr 91 12:41:39 GMT References: <18f0bf14.ARN1771@prolix.pub.uu.oz.au> <1080@cbmger.UUCP> <18f73ee5.ARN18a5@prolix.pub.uu.oz.au> <1097@cbmger.UUCP> <18fa0585.ARN1913@prolix.pub.uu.oz.au> <1116@cbmger.UUCP> Reply-To: dac@prolix.pub.uu.oz.au Followup-To: comp.sys.amiga.programmer Organization: More like Mis~, really. Lines: 97 In article <1116@cbmger.UUCP>, Peter Kittel GERMANY writes: > (see below) > > >We are working at odds here, Peter; if I want to convert some text to BIGCHAR > > Well, perhaps time for a *deep* look into the RKM's, fonts chapter... That's what I had to do; the nice person who sent me the structure convinced me to have a look there, and do it in Modula. But I resisted temptation :-). After jumping a few Arexx hurdles, I've managed to get fairly well into where I want to be, but I have to use a few kludges, because offsets into structures are just not easy to calculate in Arexx. You can't easily add numbers, you can't easily use hex offsets. It's all pretty messy. This is what I've done so far, I've now got to undecode the bitmaps using charloc and chardata; [in case anyone is slightly interested, here's what I've done so far] /*rexx*/ /*** Load rexxsupport library **********************************************/ if ~show('l','rexxsupport.library') then if ~addlib('rexxsupport.library',0,-30) then do say "no library!" exit 5 end /*** Load preset offsets into structures ***********************************/ call offsets /*** calculate GfxBase *****************************************************/ gfxbase = (showlist('l','graphics.library',,a)) /*** read TextFonts ********************************************************/ fontptr = (d2c(c2d(gfxbase,4) + TextFonts,4)) font = import(fontptr,4) /*** calculate Charloc and CharData ****************************************/ locptr = (d2c(c2d(font,4) + Locoffset,4)) charloc = import(locptr,4) dataptr = (d2c(c2d(font,4) + Dataoffset,4)) chardata = import(dataptr,4) /*** Now display some values ***********************************************/ say "gfxbase =" c2x(gfxbase) say "font =" c2x(font) say "charloc =" c2x(charloc) say "chardata=" c2x(chardata) /*convert the addresses to decimal*/ charloc = c2d(charloc) chardata = c2d(chardata) say charloc chardata /* rest of program [when written] follows */ EXIT /*** Offset precalc ********************************************************/ Offsets: TextFonts = 140 Locoffset = 40 Dataoffset = 34 -----------------------------------end of Arexx---------------------------- > Yes, I meant *these* tables where you easily could duplicate these > lines for the "A" and create entries for accented "A" in your text > editor (not at run time). Only the naming of your arrays could become > sort of a problem... I admit, once they are created, it's no great hardship to fiddle with them, but it's not an algorithmic solution to the problem, which is why I'm going down the dim dark path of peeking into fonts and ripping out the information. Now that I have the POINTERS [and some confidence in my ability to read memory with Arexx] to the Font structure, I am home free. Just the tedious mucking around with bit offsets, and expanding the bits, and then replacing them with whatever character I want [Translate(image,1,*)]. Should be a piece of cake. :-) The only thing that stopped me completing it today, was todays news. Thanks for your comments. Dac --