Thread: FG XML characters
-
July 20th, 2018, 21:39 #11
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
But I won't know if that is a font problem or FG puking on the character.
-
July 20th, 2018, 21:45 #12
Having looked and built a few .fgf fonts, I'd be willing to wager the font would be the problem more often than FG's text rendering... with the exception of a few such as the aforementioned 10. Also 9 is a problem; FG will not render a tab. I'd say you're ok with most actual renderable characters (13 being the main "does something" character that is extremely useful) just avoid the ones that typically have an action with them.
-
July 20th, 2018, 23:02 #13
Can you clarify the question please? Are you referring to characters within the XML that are going to be parsed by the base XML engine itself?
Or, are you referring to markup within the formattedtext control used to display formatted text?
These are two different things. The former is standard XML, the latter is based off the limited FG markup and the FGF font file used.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
July 21st, 2018, 00:40 #14
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
I have done some exhaustive testing, and here is what I discovered. These are assuming that the xml in the story entry is of the form &#x; where x is a decimal ascii code. I did not attempt to call setValue within FG to do this, but exited FG, edited db.xml, and stated up FG. These results apply regardless of whether you actually display the story entry with the escaped sequence:
0 - if you use (not sure why you would, but tested for completeness), FG will strip this code AND ANYTHING AFTER it in the xml tag text.
1-12: does nothing, although I assume that if the font had a printable character in these codes, it would probably display.
13: this issues a new line, as discussed in other forum threads.
14-31: as with 1-12.
32-126: I really didn't have the patience to test these printable characters, but my guess is they would behave like 127 next.
127: If you use this, it will be replaced with the actual non-escaped character (that is &# and the ; will be stripped out and just the ascii character placed).
128-255: These are untouched by FG and will display whatever the font has in the ascii code used.
Thanks for trying to help, Trenloe, but I think I have satisfied my question just doing it the hard way like Talyn suggested.
-
August 11th, 2018, 06:55 #15
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
I am trying to put in a blank line between lines of text in a string control, but the xml parser senses that the contents (and I have tried <default> and <static> to no avail) are empty, and it surpasses the control generation so that the two lines have no blank between them. What is a good way to insert a blank line between single line text controls?
-
August 11th, 2018, 07:12 #16
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Not a very elegant solution perhaps but I just wound up appending string.char(10) to the end of the control text before where I needed the blank line
-
August 11th, 2018, 07:30 #17
Look at the column templates. There’s at least a spacer a line template to break up layout.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
August 11th, 2018, 11:37 #18
In a string field you can use \n and \r whichever gives the result you're after.
-
August 11th, 2018, 13:15 #19
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Talyn, I was attempting to do it with controls for some reason, and what I did is the code equivalent of what you are saying. I am working on a general-purpose DialogLib manager for ruleset and extension developers. I will post a teaser example graphic of it today with a dialog similar to what will be in the next version of the Generators extension.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks