|
Author |
Topic: vlw fonts (Read 2254 times) |
|
Afonso_Klein
|
vlw fonts
« on: Jun 5th, 2003, 8:53pm » |
|
I was trying to use the special characters of the Portuguese language (like á, é, ç, and so on...) with the vlw fonts, and they weren't there. I'm curious, are vlw fonts a standard ? Are they external to Processing or specific to it ? How can someone build his own fonts ?
|
|
|
|
fry
|
Re: vlw fonts
« Reply #1 on: Jun 7th, 2003, 6:42pm » |
|
a teeny bit of background here: http://proce55ing.net/discourse/yabb/board_Syntax_action_displa_y_num_1041984770.html you're right, the special (non 7-bit) characters are missing from the fonts we distribute. we're hoping to replace the vlw fonts with bdf fonts, which are actually a standard (and include an auto-generator for them), and at that point we'll make sure to include the other characters. mighty carlos is in charge of this, hopefully he'll have something for us soon. we absolutely need these other characters because such a significant proportion of our users are from countries where english is not the native language. the fact that the non-ascii stuff is missing is an artifact of the file format.. we've hacked it in the past, but it would be a waste of time for now
|
|
|
|
Afonso_Klein
|
Re: vlw fonts
« Reply #2 on: Jun 10th, 2003, 3:19pm » |
|
thank you for the information. I did a little research and discovered what bdf fonts are. In order to prepare myself to deal with them, I'm going to try the xmbdfed editor and some other utilities.
|
|
|
|
fry
|
Re: vlw fonts
« Reply #3 on: Jan 22nd, 2004, 1:40pm » |
|
this will be fixed starting with 68, where the font builder will support non-ascii characters in fonts. yeehaa!
|
|
|
|
buddafinger
|
Re: vlw fonts
« Reply #4 on: Mar 16th, 2005, 4:00am » |
|
This may be covered in other topics but here is some code to show what glyphs are available. NOTE: that the char value 127 will break your code for some reason and I think that there are glyphs above 254 but I have not found an easy way of locating them without breaking my code. code:- void setup(){ background(0); size(800,800); BFont f; f = loadFont("Ravie.vlw"); textFont(f, 22); } void loop(){ background(100); fill(255); int charSpot = 0; for(int i=30; i<height-30; i+=25){ for(int j=30; j<width-50;j+=80){ text(char(charSpot)+"="+charSpot,j,i); charSpot+=1; if(charSpot == 127){ charSpot = 128; } if(charSpot == 254){ charSpot = 253; } } } }
|
« Last Edit: Mar 16th, 2005, 4:48am by buddafinger » |
|
|
|
|
fry
|
Re: vlw fonts
« Reply #5 on: Mar 16th, 2005, 5:55am » |
|
fonts are encoded with unicode, so you're only going to get unicode characters out of them. as such, it's not just straight counting (once you're above 127) to get the additional chars. the character for '127' is ascii DEL (delete), which doesn't have an image, so you're not going to get anything interesting with that. also, there were several errors in the font code in 68, this was one of the things fixed in 69.
|
|
|
|
|