Click here to go to the forum index Click here for the home page
 
Author Message

<  TAP and patch development  ~  Toppy Character Set

Page 5 of 10
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
matt
Posted: Thu Sep 20, 2007 1:38 pm Reply with quote
Forum moderator Joined: 30 Mar 2005 Posts: 2305 Location: St Ives, Cornwall Transmitter: Redruth
bdb wrote:
matt wrote:
I'd be interested in seeing the fonts to see if there's a better alternative than Teserias. Smile

maybe; but still infinitely better than courier/times new roman etc. do you have a better alternative?
I read the screenfont.ca web pages; they winge an awful lot, but seemed not to have any viable alternatives.

bdb

Yes, it's better than Courier and Times, but then so is pretty much any other sans-serif. For TV screen use, at least.

I've presented a number of alternatives in this thread. Not sure about that site as I agree it's a little OTT, but it gets the point across that Teresias isn't all it's cracked up to be.

matt

_________________
PVR: TF5800, MyStuff recommended firmware, new PSU, 250GB Spinpoint HDD, Zalman ZM-OP1 fan TAPs: QuickJump 1.72, MyStuff 6.4, EPG2MEI 0.96, Extend 1.7, Bookmark 3, UK Auto Scheduler 0.73, SecCache 0.4, EIT Sub 0.6, SDS 1.3, TAP Commander 1.34, Font Manager 1.0d. Others: HDFW 2.3a, Channel Manager 5.1, FastScanGUI, MyInfo TV: Philips 37PFL9603D
View user's profile Send private message Visit poster's website
R2-D2
Posted: Thu Sep 20, 2007 2:19 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12149
matt wrote:
Yes, it's better than Courier and Times, but then so is pretty much any other sans-serif.
I quite liked the slab-serif Rockwell version (posted after the MHEG font example) -- I put the main problems with that one down to the size and the poor rendering, but I'm most likely wrong. Smile
Quote:
I've presented a number of alternatives in this thread.
The beauty of the Toppy's font tables is that you can plug in exactly what you want. I just need to knuckle down and finish some BDF converter code. I'll leave the challenge of finding/converting your favourite font to BDF up to you (at least it's not a totally obscure format).
View user's profile Send private message Visit poster's website
R2-D2
Posted: Thu Sep 20, 2007 3:34 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12149
bdb wrote:
\x91[nn] where nn are ??? does some strange thngs, like transparent background
OK, I was a little bit confused by this, when the code looked it was setting the foreground colour (via the 16-bit decimal[!!] nn)... but now I realise that internally the Toppy inverts the alpha bit (the top bit). So "\x91[0]" is transparent black... and all values up to "\x91[32767]" are transparent!

Here's a quick TAP I threw together to show the 15 different fonts, how to access them (via the "fnttype") and how to use the "\x91[nn]" code.
View user's profile Send private message Visit poster's website
bdb
Posted: Thu Sep 20, 2007 4:27 pm Reply with quote
Frequent contributor Joined: 18 Oct 2005 Posts: 499
aarrh - I think my maths let me down when I was looking at that. Why decimal!!! Rolling Eyes and I missed the inversion. All I ever managed to do was to make the foregound transparent, but could never set the colour, or get out of transparent mode.

bdb
View user's profile Send private message
R2-D2
Posted: Fri Sep 21, 2007 7:03 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12149
justason wrote:
Strange. Just have updated without any problems.
I just tried again and the tools/MakeFonts seems to have been fixed. But the same problem still occurs on taps/fonts, with the duplicate filenames (apart from the case of the letters). Could whoever kindly tidied up tools/MakeFonts could do the same to taps/fonts?
justason wrote:
Having the sources I have sent, would it be posible to make a "Hook" TAP?
I think such a thing is possible, since all the new routines really need is a font parameter, which (as discussed above) is actually in the current API (and underlying firmware routine) -- it would be trivial to change the type of the normal "byte fntType" parameter to "FONT *fntType". The hook could then decide to use the old API if "fntType" was <=15 or 255, otherwise it could assume it was a "FONT *". It would make sense, in this case, for the new font routines to also take a fntSize parameter (and a "bDot" one, too). You'd also have to hook the TAP_Osd_GetW() routine, but I think that could be done in an analogous way (using "fntType").
Quote:
So, that the standard Toppy UI will use the antialiased fonts?
Well, maybe... there's the small matter of all the TAP API function calls in the existing rasterfontbrowser.c module -- these would have to be replaced by lower-level firmware calls (not impossible, but another layer of trickiness). And there's also the PutString variant (which does an awful lot of other processing, supporting the funny characters detailed above). And the GUI has an awful lot of sizes and spacing hard-coded (as would a lot of TAPs, too).

Hooking the TAP API versions would therefore seem like a better first step. I think there wouldn't need to be too many alterations to the existing code to support this. To test the theory, if you'd like to knock up a module with TAP_Osd_PutS() and TAP_Osd_GetW() replacements, using the "fntType" parameter for the "FONT *", then I'd be happy to try to write a quick TAP to hook them into the TAP API routines.
View user's profile Send private message Visit poster's website
justason
Posted: Mon Sep 24, 2007 7:49 pm Reply with quote
Regular contributor Joined: 20 Apr 2007 Posts: 42 Location: Finland
Quote:
To test the theory, if you'd like to knock up a module with TAP_Osd_PutS() and TAP_Osd_GetW() replacements, using the "fntType" parameter for the "FONT *", then I'd be happy to try to write a quick TAP to hook them into the TAP API routines.


Let's make it clear for me:
So, if "fntType" parameter becames something within [16..254], then FONT structure must be used.

The only problem is that fntType is only 1 byte long, but pointer to a structure is 4 bytes. (or how much is the actual size of pointer in Toppy?)

One way is to make FONT structure global - I do not like this. But I can use "fntType" parameter as an indexer for array of fonts.

Pavel

_________________
TF5500PVR
FW: 5510 + ID Patch + USB Patch + Startup acceleration Patch + aXeL
View user's profile Send private message
R2-D2
Posted: Mon Sep 24, 2007 9:13 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12149
I suppose it depends what you have in mind for the TAP API hook. You could either use this to make it easier for TAP writers to use the new font code (and maybe centralise it into a hook TAP, rather like a .dll), or you could try to force new fonts to be used where TAPs weren't expecting them. I was thinking the former was more likely, since layout is probably hard-coded in a TAP to a certain degree (which applies to the Toppy's native GUI, too) -- although careful choices of font sizes might work.

For example, the hook TAP could use the new fonts for fntType values from 16-254 (as you say), and this could be configurable by the user (although, realistically this is too far many). Maybe a scheme like the hook TAP defining the first few as fixed sized (height) ones for a fixed type of usage (header, body, etc.), with the size following the Toppy's 3 fntSize values (and maybe some others). And TAPs could supply there own fonts by passing their "FONT*" as the fntType -- again, it would be good to follow the Toppy's sizes for those values of fntSize.

If this works well enough then it might lead to being able to replace the system fonts, with poor choices of font being down to the user...
Quote:
The only problem is that fntType is only 1 byte long, but pointer to a structure is 4 bytes. (or how much is the actual size of pointer in Toppy?)
All function arguments are passed in 32-bit value slots, with the function (usually) masking the value down to the bits appropriate to the argument type. Obviously a hook can do what it likes with the arguments.
View user's profile Send private message Visit poster's website
justason
Posted: Tue Sep 25, 2007 8:17 pm Reply with quote
Regular contributor Joined: 20 Apr 2007 Posts: 42 Location: Finland
by the way,
what returns TAP_Osd_PutS???

can't get it from http://toppy.xwiki.com/xwiki/bin/view/Main/AllOsdStringFunctions

... Sad

-------- (added later) ---------
Have made the hook functions. Will be back tomorrow after some testing.
It is too late here now...

_________________
TF5500PVR
FW: 5510 + ID Patch + USB Patch + Startup acceleration Patch + aXeL
View user's profile Send private message
R2-D2
Posted: Tue Sep 25, 2007 8:56 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12149
justason wrote:
by the way,
what returns TAP_Osd_PutS???
Ah... I had a look at that a while back and what TAP_Osd_PutS() returns is zero. I thought the underlying firmware routine might return something useful, but it appears to return the final x position, or maxX (if it's not -1).

In my opinion, this is another area where TAPs that are aware of the hook could make use of a decent return value: the number of chars that were actually displayed.
View user's profile Send private message Visit poster's website
birdman
Posted: Wed Sep 26, 2007 12:37 am Reply with quote
Frequent contributor Joined: 13 Dec 2006 Posts: 1689 Location: Hitchin, HERTS Tx: Sandy Heath
R2-D2 wrote:
In my opinion, this is another area where TAPs that are aware of the hook could make use of a decent return value: the number of chars that were actually displayed.
Except that with proportional fonts that value doesn't mean very much, surely.

_________________

Toppy: TF5800PVR/250 - Black, now 1TB WD10EURX
F/W: MS6 Recommended F/W 12/9/2009 -FmVrXp+BmC0CbFsIPsUUuWfZXl,
Loader: C5.14, Hardware: 1.01
TAPs: SecCache (UK) v0.4; EPG2MEI v0.96; FontManager 1.0d; QuickJump 1.71; MhegOnOff(Now1) A3; EIT Sub v0.6; MyStuff 6.6
USB connected: SheevaPlug with Debian wheezy
Sig mostly from MyInfo on 26/10/09
View user's profile Send private message
R2-D2
Posted: Wed Sep 26, 2007 6:31 am Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12149
birdman wrote:
Except that with proportional fonts that value doesn't mean very much, surely.
I'm not sure what you mean. This is precisely for coping with proportional fonts. The caller would then know where the string they supplied had been split, so could continue on the next line (or something). Of course, it would be also be good if the bDot parameter being false meant split at whitespace. Or maybe extend the bDot values, too.
View user's profile Send private message Visit poster's website
justason
Posted: Wed Sep 26, 2007 7:24 pm Reply with quote
Regular contributor Joined: 20 Apr 2007 Posts: 42 Location: Finland
http://rapidshare.com/files/58450616/HookTest.zip.html

Here is an archive.
It contains probably everything that needed to make further hooking: example tap, example fonts, makefonts executable and of course sources.

please check fonts.c to see how it works.
Shortly:
0. Run TAP. Press "1".
1. "Exit"closes the TAP
-------------------------
1. Three fonts can be loaded: small, medium and big
2. Function TAP_Osd_PutS_HOOK, might take constant FONT_OVERRIDE (=100) as fntType. And then fontLibrary works
3. bDot is not used YET. Just I did not imagine elegant way to implement "..."
4. fonts mus be deleted after use
5. maybe I forget something?

Comments............

_________________
TF5500PVR
FW: 5510 + ID Patch + USB Patch + Startup acceleration Patch + aXeL
View user's profile Send private message
R2-D2
Posted: Thu Sep 27, 2007 7:15 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12149
justason wrote:
It contains probably everything that needed to make further hooking: example tap, example fonts, makefonts executable and of course sources.
Cool! I'll have a look and see if I can hook the API, and then see what happens.
View user's profile Send private message Visit poster's website
R2-D2
Posted: Fri Sep 28, 2007 9:29 am Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12149
justason wrote:
It contains probably everything that needed to make further hooking: example tap, example fonts, makefonts executable and of course sources.
OK, so after a few attempts at hooking the wrong bit of memory (Smile) I got it working. I made a copy of the display code to use the Toppy call when "2" was pressed... and it worked well. However, it's not yet at a stage where it can be plugged in for other TAPs due to a number of issues:
  • The hook will recursively call itself if the fntType is not the override value (since it's hooked into the Toppy routine!). This just means the code needs to be a bit more complicated to handle that case (for testing, I just made the hook routine always use the new font code).
  • The replacement font routines still use Toppy routines (like TAP_Osd_DrawPixmap), so there's the $gp issue here (the code uses the hook TAP's $gp, which is not going to be right in general). This can be fixed -- using info from another thread, it's probably easiest to dump the necessary values into an array.
I'm off on holiday for a bit, so it may be a while before I can look at this again -- if anyone else feels like taking up the baton in the mean time, please do!
View user's profile Send private message Visit poster's website
chunkywizard
Posted: Fri Sep 28, 2007 9:37 am Reply with quote
MyStuff Team Joined: 13 May 2005 Posts: 9305 Location: Sindlesham, Berkshire Tx: Hannington
R2-D2 wrote:
I'm off on holiday for a bit, so it may be a while before I can look at this again


Not going to Korea are you? That would be handy Wink Laughing

CW

_________________
Toppy:TF5800 F/W: 1365PaTcHeD
TAPs: MyStuff | EPG2MEI | FontManager | SecCache UK | Extend | FastScanGUI | EIT_sub_game | MyInfo | ScreenCapture with OSD | MHEG On/Off
MyStuff Manual & Logos | Known Bugs | Recommended F/W
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT
Page 5 of 10
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum