melted / garglk

Automatically exported from code.google.com/p/garglk
Other
0 stars 0 forks source link

Allow specifying a third font family #186

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A third font family would allow configurations that use serif, sans serif, and 
monospace for different purposes; for example, monospace text would use the 
monospace font, most text might use the serif font, and headlines would use the 
sans serif font.

Original issue reported on code.google.com by tow...@gmail.com on 10 May 2012 at 7:37

GoogleCodeExporter commented 9 years ago
Can you give me some context around what you are trying to accomplish here?

Gargoyle could be made to recognize additional fonts and allow you to set them 
as the default for a particular style, but in Glk as it stands there is no way 
for games to request anything other than proportional or monospace. 

I can see some value in giving players more knobs to customize the default 
appearance. If that's all you're after, I think it's a reasonable idea. But I 
want to be clear that games won't be able to access the added font, and may 
stomp on those choices if permitted to set style hints.

Original comment by bcressey@gmail.com on 14 Jun 2012 at 6:18

GoogleCodeExporter commented 9 years ago
Customizing appearance is all I'm after. :-)

I hacked together a proof-of-concept patch (read: patch I'm not proud of) that 
allows me to specify pro2font/pro2size in addition to monofont/monosize and 
propfont/propsize. I then set tfont-3 to pro2b and tfont-4 to pro2r in 
garglk.ini. The patch is attached, but it's really just the bare minimum of 
ugly code I needed to get what I wanted.

I've also attached a screenshot of output from a game with the patch. Note the 
sans-serif font used in the main and secondary titles.

Original comment by tow...@gmail.com on 14 Jun 2012 at 6:23

Attachments:

GoogleCodeExporter commented 9 years ago
Very thorough patch. I can see why you might not be proud of it but most of the 
ugliness comes down to Gargoyle and its deep-seated belief that two font 
families should be enough for anyone.

Let me ponder this a bit; I'd like extend the font support in a way that 
doesn't just raise the limit from 2 to 3, but for that to be tolerable there 
needs to be a way to support N fonts without copy/pasting the font-loading 
stanzas N times.

Original comment by bcressey@gmail.com on 15 Jun 2012 at 6:53

GoogleCodeExporter commented 9 years ago
> ... I'd like extend the font support in a way that doesn't just raise the 
limit from
> 2 to 3, but for that to be tolerable there needs to be a way to support N 
fonts
> without copy/pasting the font-loading stanzas N times.

+1

Original comment by tow...@gmail.com on 15 Jun 2012 at 8:10