I went through the forums and a bit of the documentation looking for a better explanation on how to use fonts in order to style points. I am looking to use some Wingdings symbols to represent some of my point features, but I am looking for a better explanation on the constructor parameters for these.
So far, I have something similar to:
styledPoint = New PointStyle(New GeoFont(“Wingdings”, 16), 251, New GeoSolidBrush(GeoColor.StandardColors.Red))
However, I am confused about the 2nd parameter of the new PointStyle constructor. Is that supposed to the decimal representation of the Wingding font (ex. something like 33 for a pencil shape) or is it supposed to be something like the hexadecimal representation (ex. 0x20 for the same pencil shape)?
Also, how may Unicode characters play into this? Is there a specific value your constructor looks for, or is there a chance I may be able to use both fonts and Unicode characters?
Is there is a chance you would be able to provide a sample somewhere that will show point symbols generated from fonts? The list I am referencing comes from alanwood.net/demos/wingdings.html. I am assuming that list is correct, but I don’t know for sure.
Using Fonts to Style Points
Hi,
We know Wingdings is provided by Windows (en.wikipedia.org/wiki/Wingdings), so I think you can easily find a comparison table about how to set the 2nd parameter “characterIndex”. It’s a integer number, so it should be put just like “33” but not “0x21”. But you can convert “0x21” to “33” before use it because they are the same.
About draw Unicode characters, I think that depends on the run-time machine environment. I think our class can draw anything the environment supported. Maybe you can have a test about this for make sure it.
I think your list is correct, and for this function, I think it just need a simple code like yours:
GeoFont geoFont = new GeoFont(“wingdings”,12);
CustomPointStyle customPointStyle = new CustomPointStyle(geoFont, 200, new GeoSolidBrush(GeoColor.SimpleColors.Red));
We don’t need do more things for it, if you have any further requirement about it please let us know.
Regards,
Don