PDA

View Full Version : HTML Symbols



dulux-oz
April 13th, 2014, 06:47
Hi Guys,

Is there a list or a statement about which HTML Symbols FG will display correctly in Strings - apart from trying out each one (which is a pain-in-the-...)?

Cheers

Bidmaron
April 13th, 2014, 15:00
Try here (https://www.fantasygrounds.com/forums/showthread.php?14323-What-HTML-Attributes-are-available-in-FG2).

dulux-oz
April 13th, 2014, 15:14
Try here (https://www.fantasygrounds.com/forums/showthread.php?14323-What-HTML-Attributes-are-available-in-FG2).

Yeah, I read that thread, but as it is from 3 years ago and doesn't directly answer my question anyway (nothing about HTML Symbols), I thought I'd (re-)post to see if anything has changed.

Bidmaron
April 13th, 2014, 15:28
I don't think anything has changed, although there was improved table support after the production of the post, but I don't think it actually changed the tags. We may need JPG or Trenloe to weigh in here....

Trenloe
April 13th, 2014, 15:43
https://www.fantasygrounds.com/refdoc/formattedtextcontrol.xcp

dulux-oz
April 13th, 2014, 15:56
Still not answering my question, guys. I'm not asking about TAGS, I'm asking about SYMBOLS.

Let me rephrase my question - say I wanted to use a Smiley Face in a Label (don't ask why, its just an example). Now the HTML Symbol Code for a Smiley Face is 9786, which I can use in a HTML/XML document as '& # 9786 ;' (see, it even works here: ☺ ).

What I'd like to know - without trying each one - is which of these HTML Symbols I can use, if any?

Trenloe
April 13th, 2014, 16:04
It's formatted text, not symbols. The control is not based on an actual HTML control, it is something that had been developed over the years to support certain HTML-like tags for text formatting.

If you want symbols you will have to use a FG font that supports the symbols you want. The WFRP3 and Star Wars: Edge of the Empire ruleset does this to display the die symbols in text.

dulux-oz
April 13th, 2014, 16:25
Ah, right, now we're on the same page - thanks, Trenloe, that now makes a lot sense - back to the old drawing board (or should that be font creator) :)

Cheers

Bidmaron
April 13th, 2014, 16:32
You many not have to use font creator. There is some kind of true font support now, but I don't think the docs are out yet for it. However, if you go to the xml definition files in CoreRPG, you should be able to find some example definitions of truetype fonts.

Nickademus
April 13th, 2014, 19:58
I know what you are asking, but I don't understand Trenloe's response. I use a few of these myself without the need for FG fonts; or rather, they work with the default fonts where I use them. The latter is most likely the case. I use & and » quite often for feats.

Why not just right a block of code that loops through the numbers and displays the symbol in the area of FG you would want it to?

Trenloe
April 13th, 2014, 20:21
I know what you are asking, but I don't understand Trenloe's response. I use a few of these myself without the need for FG fonts; or rather, they work with the default fonts where I use them. The latter is most likely the case. I use & and » quite often for feats.
That works because the font contains a symbol with ASCII code 187. That is what I meant when I said "If you want symbols you will have to use a FG font that supports the symbols you want."

Anytime a font is used in an FG control (formatted text field, string control, etc.) you are limited in what you can display to what the font contains.

Donwload Neil Foster's font editor and have a look at what the FG fonts contain: https://googledrive.com/host/0B27SCDR38xFuNE96TGV4S1Jjdlk/fantasy-grounds-ii/fantasy-grounds-ii-font-editor.html

Here is the regular-11.fgf font shown in the font editor. I have highlighted character number 187:

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Fantasy%20Grounds/Character%20187.jpg

This is where the FG symbol for character 187 comes from - not from any HTML symbol code standard. Luckily, most of the fonts in FG adhere to the symbol standard - but you can't take this for granted, especially with custom fonts.

Trenloe
April 13th, 2014, 20:45
And, with FG fonts, you're limited to 8-bit character codes (0-255).

Nickademus
April 14th, 2014, 01:45
That editor will be nifty. I was looking for something like that the other day.

damned
April 14th, 2014, 04:26
That works because the font contains a symbol with ASCII code 187. That is what I meant when I said "If you want symbols you will have to use a FG font that supports the symbols you want."

Anytime a font is used in an FG control (formatted text field, string control, etc.) you are limited in what you can display to what the font contains.

Donwload Neil Foster's font editor and have a look at what the FG fonts contain: https://googledrive.com/host/0B27SCDR38xFuNE96TGV4S1Jjdlk/fantasy-grounds-ii/fantasy-grounds-ii-font-editor.html

Here is the regular-11.fgf font shown in the font editor. I have highlighted character number 187:



This is where the FG symbol for character 187 comes from - not from any HTML symbol code standard. Luckily, most of the fonts in FG adhere to the symbol standard - but you can't take this for granted, especially with custom fonts.

is there anything this guy doesnt know?

Bidmaron
April 14th, 2014, 04:33
Still looking....

Trenloe
April 23rd, 2014, 20:18
It looks like the formattedtext control supports ALT+XXX number codes based off the Extended ASCII Codes (see the Extended ASCII Codes table here: https://www.asciitable.com/) and so you can press-and-hold the ALT key and type in the code on your keyboard numeric keypad. When you release the ALT key the character relating to the code entered should be displayed. For example, for a lower case e-acute = é press and hold ALT, type 130 on the numeric keypad (it has to be the keypad, not the numbers along the top of the keyboard), and then release the ALT key and the symbol should appear. This only covers the more font type characters rather then symbols...

Bidmaron
April 23rd, 2014, 20:53
Wow, Trenloe. Nice - don't remember hearing that one before.