We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Symbol font doesn't display symbols
Page Index Toggle Pages: 1
Symbol font doesn't display symbols (Read 343 times)
Symbol font doesn't display symbols
Feb 17th, 2009, 11:02pm
 
I want to display tick and cross symbols which are part of the MonotypeSorts font. Load the font and select it with textFont as usual, but displaying characters "4" and "8", which represents said tick and cross, actually appears as "4" and "8".  I've tried entering the character codes (52 and 56) but still no luck. Keyboard Viewer on Mac shows the correct symbols and so does typing them into a word processor with the given font.
Seems a strange behaviour.  Anyone managed to display symbols?  (I've tried other symbol fonts such as Webdings and still the same problem).




Re: Symbol font doesn't display symbols
Reply #1 - Feb 20th, 2009, 9:25am
 
i bet there is something wrong in your code...
if it shows fonts,it should show the symbols too.
can you  maybe post your code? i will take a look.

Re: Symbol font doesn't display symbols
Reply #2 - Feb 20th, 2009, 10:50am
 
Cedric wrote on Feb 20th, 2009, 9:25am:
i bet there is something wrong in your code...
if it shows fonts,it should show the symbols too.
can you  maybe post your code i will take a look.



Here's a little test sketch. Perhaps you can spot the undeliberate error! I cannot.  Thanks
ps. I've tried Wingdings2 as well but the same result ... ie. the alphabetic characters are draw rather than the symbol with that particular char code.

Quote:
PFont normalFont12, fontSymbols16;

void setup() {
  size(200, 100);
  normalFont12 = loadFont("Dialog-12.vlw");
  fontSymbols16 = loadFont("MonotypeSorts-16.vlw");
}

void draw() {
      fill(color(255));
      textFont(normalFont12, 12);
      text("this should be a cross", 10, 20);
      textFont(fontSymbols16, 16);
      text(char(56), 150, 20);
      textFont(normalFont12, 12);
      text("this should be a tick", 10, 50);
      textFont(fontSymbols16, 16);
      text(char(52), 150, 50);
}


Re: Symbol font doesn't display symbols
Reply #3 - Feb 20th, 2009, 11:22am
 
Hmm ok, guess i was wrong... its not your code.
its the font file...
i found out that processing just cant read some of the fonts, mostly custom fonts,  but some others too...
but i testet it with some "comic bubble symbol font" and a custom made font of vector shapes, and they both work...

But like you see, processing cant read and convert some of the fonts allready previewing them in the fontcreator. Maybe looking and testing some fonts with different crosses, solves your problem for now.


http://dev.processing.org/bugs/show_bug.cgi?id=45
http://dev.processing.org/bugs/show_bug.cgi?id=407
Re: Symbol font doesn't display symbols
Reply #4 - Feb 20th, 2009, 11:43am
 
Many thanks Cedric. The bug reports didn't come up when I searched earlier. It would be useful if create font gave a warning that it couldn't do what it says it has done.  Smiley

I'll search for some ticks and crosses in other fonts and see if I can find one that works!  Failing that, I'll have to draw them but I did want some nice curvy symbols.  Cheers.

Re: Symbol font doesn't display symbols
Reply #5 - Feb 20th, 2009, 11:56am
 
goodluck, maybe you find something here
http://www.searchfreefonts.com/search/?q=symbols
http://www.dafont.com/theme.php?cat=721

Re: Symbol font doesn't display symbols
Reply #6 - Feb 20th, 2009, 5:20pm
 
Many thanks for the links. Plenty to sift through there!
Re: Symbol font doesn't display symbols
Reply #7 - Feb 20th, 2009, 5:52pm
 
if you cant find the right one, just make one of your own, with some font editors...

maybe you can use http://fontstruct.fontshop.com/
for that purpose
Page Index Toggle Pages: 1