Do fonts have subsets?
Displaying 1-16 of 16 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
rpgking

Or does everything have to be loaded as a new font?

Posted on 2004-04-19 01:38:44 (last edited on 2004-04-19 01:38:58)

vecna

There's no subsets at this time.
Its certainly something that could be added, but the hardcoded weird ascii codes to switch subsets always seemed rather hacky to me.

Posted on 2004-04-19 12:57:20

rpgking

Yeah, they were pretty awkward, but I always just used constants to reference them. :)

It's easy enough to load them as different fonts though.

Posted on 2004-04-19 22:11:26

Interference22

Would a hybrid sort of HTML tag system work? Like this (assume the brackets are greater thans and less thans, I can't remember how to get them to show up):

"Hello! I'm in subset 0! {1}And I'm in subset 1!{/1} And I'm back in subset 0 again."

Posted on 2004-04-21 01:08:51 (last edited on 2004-04-21 01:11:52)

el_desconocido

I'm already using two fonts for ILL, latest code is in Sullied Cronichles, too lazy to grab the link now, you know where it is...

It already is checking strings char by char, you, or given a little time, I, could easily hack it to do what you're talking about. A redone version of RemapLetter() could instead return which subset to use like maybe:
if(!strcmp(remap_lbuffer, "%%4")) { remap_lbuffer = ""; return FONT_4_IDX;}


Alter PrintStringI() to be PrintStringMF() (multi-font) a little and hell it's almost done...

Light a fire under my ass if you want me to whip it out.

El

PS: say AND I want a Less (Greater) Than: &lt; &gt; < >

Posted on 2004-04-21 13:50:26

mcgrue

If you do that, I'll give you an avata...

...

...oh, right.

Well, you should still do it. Because it'd be way way useful!

Posted on 2004-04-21 14:10:21

el_desconocido

I was just coming back to point out that remap_lbuffer never has more that a single char, so a little more work than I implied would be required, but not much, and I see where.

So... Consider it done. (in a day or two)

El

Posted on 2004-04-21 14:34:03

Troupe

Grue has lost his leverage! You'll have to think up something else to make VERGEers do something now.

Desc, are you planning to do the bracket thing? That would be really handy, but I can't really understand all that code you posted, so I pray that you are doing something cool.

I know, I'm a bad bad programmer.

Posted on 2004-04-21 17:44:34

mcgrue

Lost my leverage? Oh, didn't you know? Avatars reset every 3 months!

You have 5 weeks left. Enjoy them.





(for the extremely gullable out there, the above statements were LIES.)

Posted on 2004-04-21 18:08:03

el_desconocido

Desc, are you planning to do the bracket thing?

I will use an escape sequence to switch subsets, until you switch it again, or the string has been printed.
As a default, I plan to use the pipe (hehheh), because it looks clean. Example:
PrintStringMF(blah... "This is a |1|test.");

PrintStringMF(blah... "This is |1|also |0|a test.");
PrintStringMF(blah... "|1|This is a test.");

Assuming subset 1 was bold, would print:

This is a test.
This is also a test.
This is a test.

But... the #defines for what escape sequences are used can be easily changed by you to suit your needs.

El

Posted on 2004-04-22 03:45:30

el_desconocido

I'll clean up the code and readme this weekend maybe, but won't break what's here.

Default font + 8 subsets.
Run verge.exe and/or look in system.vc to see how to use it.

It uses %0 for default, %8 for subset 8 etc.

Font Subsets (version .1)

Buy one now get 9 different colered fonts for free.

El

Posted on 2004-04-22 09:38:47

Troupe

Whoa, awesome. You are truly a great man.

Posted on 2004-04-22 14:11:34

mcgrue

Exceedingly useful. I think I shall use it in SotS when I get back to it.

And I'll see if Hahn agrees that doing the colored text thang is neat and awesome and should go into Sully.

Posted on 2004-04-22 19:04:23

el_desconocido

Then I shall work extra hard to clean up the code, comment well, and otherwise polish all hard surfaces with spit and an old napkin I found in my jacket pocket.

El

Posted on 2004-04-22 22:52:57

rpgking

Cool, I'll definitely make use of this. Thanks a lot. :)

Posted on 2004-04-23 01:25:17

el_desconocido

Thanks a lot. :)

No prob. :)

But there's more... From FontSubsets.vc:

Use %0 - %9 and %a - %f to switch to any of the 16 subsets.
%% will give you a % percent sign
%q will give you a " double quote

PrintStringS(int x, int y, int destimage, int font, string text)
works just like PrintString(), except that the font is actually
ignored, pass a 0 if you want.

TextWidthS(int font, string text)
works just like TextWidth()

FontSubsets Version 1.0

El

Posted on 2004-04-23 15:56:28


Displaying 1-16 of 16 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.