Is it possible to change font data directly in code or do I have to create my own true type font containing the icons?
the best aproach IMHO would be an API in VDR that allows you to "nail" custom glyphs into the glyph cache. though this could lead to problems if multiple plugins overwrite the same codepoints in the cache. using a custom font would work too but you would force every user of your plugin to use that font. making a ttf font is no fun either. maybe there should be some way to mix cOsd::Bitmap with normal text?
Messing with the fonts is not a good idea, IMHO.
It works for VDR 1.4.x ;-)
I'll see about a method to add icons to the menu items. However, this has veeery low priority ;-)
So my only option for now is a true type font containing the icons. Or maybe to create a skin plugin that can displays the icons.
At the moment I try to solve the hole issue by using a true type font containing the icons. There was done some work at vdr-portal.de (thanks folks ;) )
But there comes the next problem. Until now, I use the space between 0x80 and 0x9f, which is marked as unused for ISO8859. But this does not work for UTF-8. Amair from vdr-portal.de suggests to use the position after 0xe000 for this case. So I need two different fonts and I have to check, if VDR is running in an UTF-8 environment and set the values for the icons accordingly.
This hole TTF and UTF-8 crap makes the handling of the icons very complicated. Maybe it is the best for now to replace the icons with normal letters until VDR provides support icons. I don't want to dictate the users what font they have to use.
Martin
On Sat, 15 Mar 2008, Martin Prochnow wrote:
This hole TTF and UTF-8 crap makes the handling of the icons very complicated. Maybe it is the best for now to replace the icons with normal letters until VDR provides support icons. I don't want to dictate the users what font they have to use.
These dedicated letters can be easily detected in skins and replaced by real icons as already done for event markers (and progressbar) in skinsoppalusikka.
BR, -- rofa
Hi!
On Samstag, 15. März 2008, Rolf Ahrenberg wrote:
On Sat, 15 Mar 2008, Martin Prochnow wrote:
This hole TTF and UTF-8 crap makes the handling of the icons very complicated. Maybe it is the best for now to replace the icons with normal letters until VDR provides support icons. I don't want to dictate the users what font they have to use.
These dedicated letters can be easily detected in skins and replaced by real icons as already done for event markers (and progressbar) in skinsoppalusikka.
You're right that's possible, but you lose scaling, so the resulting (static) symbol might be too small or large. And it's error-prone because you have to exactly know where you have to replace which characters.
Sure, it's not a perfect solution to use a patched font, even as it's not a lot of work getting your own patched font by using my fontforge script. But you have scaling out-of-the-box and it's clear where a plugin developer wants which symbols and it's even clearer when using UTF8 because then there are no characters that have to be replaced by anyone's PatchFont(). The only thing a plugin developer has to do is to use the correct characters in both cases which should not be too hard to implement: a simple check in the plugin's start() for UTF8 could assign the correct characters to variables that can be used at the needed places. And this even works for skins that don't implement symbol-by-character replacement like skinsoppalusikka or EnigmaNG.
Regards, Andreas