You know how \B .. \b denotes bold text in Hugo? And \I (text) \i does the same for italics? Can you make your own version of that?
Let's say you want \Y \y to note that the text in between should be yellow. Can you do that by making a change to the library?
\B.... but custom?
Moderators: Ice Cream Jonsey, joltcountry
- Ice Cream Jonsey
- Posts: 30191
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
\B.... but custom?
the dark and gritty...Ice Cream Jonsey!
-
- Posts: 192
- Joined: Mon Nov 22, 2004 3:19 pm
- Location: Wichita, KS
- Contact:
I never found a way, when I was messing with colors before. A section starting at around line 240 in hemisc.c (the Hugo source code) shows where it handles format codes.
It would probably be possible to write your own front-end, but I don't know how slow it would be. Basically, you'd call a functon like MyPrint("whatever"), which converts "whatever" to an array and then processes it a character at a time. You could look for your own formatting codes there, and just "print" (with a semicolon after each character) anything that isn't your own code. It probably wouldn't even be a very difficult routine to write.
It would probably be possible to write your own front-end, but I don't know how slow it would be. Basically, you'd call a functon like MyPrint("whatever"), which converts "whatever" to an array and then processes it a character at a time. You could look for your own formatting codes there, and just "print" (with a semicolon after each character) anything that isn't your own code. It probably wouldn't even be a very difficult routine to write.
You could also write a little pair of routines like
StartMyText
"Blah Blah Blah..."
EndMyText
where StartMyText would 'text to <somearray>' and EndMyText would purge the <somearray> buffer, paying attention to your custom formatting, before setting 'text to 0', in order to save on filling up the dictionary with those phrases passed as arguments. If that makes any sense.
StartMyText
"Blah Blah Blah..."
EndMyText
where StartMyText would 'text to <somearray>' and EndMyText would purge the <somearray> buffer, paying attention to your custom formatting, before setting 'text to 0', in order to save on filling up the dictionary with those phrases passed as arguments. If that makes any sense.
- Ice Cream Jonsey
- Posts: 30191
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
- Ice Cream Jonsey
- Posts: 30191
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact: