PDA

View Full Version : [library] symbols within text?



sondermann
March 7th, 2010, 08:32
I'm working on a new ruleset. This will eventually be an official ruleset, so I want to capture the feel as close as possible.

Anyways, this rpg uses smbols to tag text sections for specific play styles. Is there a way to incorporate symbols (images) into formattedtext and string fields?

To be more concrete, I need to be able to place a symbol in front of either a header or a paragraph but not in front of all of them. This symbol is slightly larger then the normal font (but size can be adjusted) and has only one color (different from the text font).

One solution I can think of is somehow converting the symbols into a new font and somehow using two fonts (the symbol font and the normal font) in the same textfield.

Any ideas?

Zeus
March 7th, 2010, 08:43
I'm not sure if you can specify more than one font for a textfield or text based control. Unless that is the control supports different states.

Another way of achieving this, would be to register the symbols you require as icon resources. Then in the windowclass for the object your defining, bind the icon controls near your headers and make them invisible by default.

You can then change the visibility of the icons programatically based upon any criteria you require i.e. when headers contain certain strings etc. etc.

You could of course also create your new font and then create an additional textfield for the symbols. You could also then turn them invisible and adjust visibility based upon your criteria.

drahkar
March 7th, 2010, 13:09
The only way I can think of doing something like this is to have some sort of selector and separately defined field for the symbol from the rest of the paragraph. Then you choose which symbol to display depending on what type of paragraph it should be.

cylone
March 7th, 2010, 14:01
Maybe not quite what you want, but perhaps you could just make a new font (just edit one and replace ie. #, $, % with your symbols). Its size can be made naturally big (bigger than normal fonts).

I dont remember the exact process (or the name), but there is a program that can then convert that truetypefont into .fgf that FG uses. (theres a link somewhere here on the forums)

Then you can just type normaly and use % when you need the symbol. This however doesnt make it a different color.