FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 494 : public PFont(Font font, boolean smooth, char charset[])
Last modified: 2007-01-29 18:52
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
hedb
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2007-01-21 13:40
requires that the charset would be sorte by size.
This is later on used in index_hunt
So either it should appear in the java doc
or index_hunt becomes slower
or we do some sorting somewhere in the create method
Scenario:
Took the default charset + the hebrew charset
and couldn't find the hebrew chars though they have been created in the font:
I.e.
int alef = 'א' , taf = 'ת';
int numOfHebrewChars = taf - alef + 1;
char hebrewCharset [] = new char [PFont.DEFAULT_CHARSET.length +
numOfHebrewChars];
for (int i=0;i<hebrewCharset.length;i++) {
if (i<PFont.DEFAULT_CHARSET.length) {
hebrewCharset[i] = PFont.DEFAULT_CHARSET[i];
} else {
hebrewCharset[i] = (char) (alef + (i-PFont.DEFAULT_CHARSET.length));
}
}
f = createFont("Narkisim",36,true,hebrewCharset);
Additional Comment
#1 From fry 2007-01-29 18:52
ah, interesting. i think you're the first to try out the charset parameter :)
i've altered the PFont constructor to sort the charset passed to it. it's
one line of code versus two lines of documentation that nobody will read.
fixed for 0124 (and now in subversion), thanks for the report.