R
Roedy Green
I decided to measure just how big various fonts really are in pixels.
The variance is quite astounding.
Here is my code to do it.
/**
* get actual height of font
*
* @param FontName name of font
*
* @return true height of a 10 point font in pixels.
*/
float getTrueFontHeight( String FontName )
{
final Font f = new Font( FontName, Font.PLAIN, 10 );
final BufferedImage dummybi = new BufferedImage( 200
/* dummy */,
200
/* dummy */,
BufferedImage.TYPE_4BYTE_ABGR_PRE );
final Graphics2D dummyg2d = dummybi.createGraphics();
final FontRenderContext fr = dummyg2d.getFontRenderContext();
final LineMetrics lm = f.getLineMetrics(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnoprstuvwxyz01234567809()[]{}",
fr );
return lm.getDescent() + lm.getAscent();
}
You can run the code on your own fonts by running the FontShower
applet at http://mindprod.com/applet/fontshower.html
Select the "all fonts summary" option.
Fonts Available to Java under Windows Vista
Font Name True height of a 10 point font
Aharoni 10.9
Andalus 15.9
Angsana New 12.9
AngsanaUPC 12.9
Arabic Typesetting 11.9
Arial 11.9
Arial Black 14.9
Balloon Bd BT 12.9
Balloon Lt BT 11.9
Batang 10.9
BatangChe 10.9
Bitstream Vera Sans 12.9
Bitstream Vera Sans Mono 12.9
Bitstream Vera Serif 12.9
Book Antiqua 12.9
Bookman Old Style 12.9
Bookshelf Symbol 7 10.9
Bradley Hand ITC 12.9
Browallia New 11.9
BrowalliaUPC 11.9
Calibri 10.9
Cambria 12.9
Cambria Math 12.9
Candara 10.9
Comic Sans MS 14.9
Consolas 10.9
Constantia 10.9
Corbel 10.9
Cordia New 11.9
CordiaUPC 11.9
Courier New 11.9
DaunPenh 13.9
David 10.9
DejaVu Sans 12.9
DejaVu Sans Condensed 12.9
DejaVu Sans Light 12.9
DejaVu Sans Mono 12.9
DejaVu Serif 12.9
DejaVu Serif Condensed 12.9
DFKai-SB 10.9
Dialog 12.9
DialogInput 13.9
DilleniaUPC 6.9
DokChampa 12.9
Dotum 10.9
DotumChe 10.9
Estrangelo Edessa 11.9
EucrosiaUPC 6.9
Euphemia 13.9
FangSong 10.9
Franklin Gothic Medium 11.9
FrankRuehl 10.9
FreesiaUPC 6.9
Gautami 17.9
Georgia 11.9
Gisha 12.9
Gulim 10.9
GulimChe 10.9
Gungsuh 10.9
GungsuhChe 10.9
Helsinki 20.9
Helsinki Metronome 20.9
Helsinki Special 29.9
Helsinki Text 13.9
Impact 12.9
Inkpen2 20.9
Inkpen2 Chords 16.9
Inkpen2 Metronome 20.9
Inkpen2 Script 11.9
Inkpen2 Special 29.9
Inkpen2 Text 18.9
IrisUPC 6.9
Iskoola Pota 11.9
JasmineUPC 6.9
KaiTi 10.9
Kalinga 15.9
Kartika 14.9
KodchiangUPC 6.9
Latha 17.9
Leelawadee 12.9
Letter Gothic Line 8.9
Levenim MT 14.9
LilyUPC 10.9
Lucida Bright 12.9
Lucida Console 10.9
Lucida Handwriting 14.9
Lucida Sans 12.9
Lucida Sans Typewriter 12.9
Lucida Sans Unicode 15.9
Malgun Gothic 13.9
Mangal 17.9
Marker Felt Thin Plain 11.9
Marlett 9.9
Meiryo 15.9
Microsoft Himalaya 10.9
Microsoft JhengHei 13.9
Microsoft Sans Serif 11.9
Microsoft Uighur 10.9
Microsoft YaHei 13.9
Microsoft Yi Baiti 10.9
MingLiU 10.9
MingLiU-ExtB 10.9
MingLiU_HKSCS 10.9
MingLiU_HKSCS-ExtB 10.9
Miriam 10.9
Miriam Fixed 10.9
Mongolian Baiti 11.9
Monospaced 13.9
MoolBoran 13.9
MS Gothic 10.9
MS Mincho 10.9
MS PGothic 10.9
MS PMincho 10.9
MS UI Gothic 10.9
MV Boli 16.9
Narkisim 10.9
NSimSun 10.9
Nyala 9.9
OCR A Extended 10.9
OpenSymbol 12.9
Opus 20.9
Opus Chords 13.9
Opus Chords Sans 13.9
Opus Chords Sans Condensed 13.9
Opus Figured Bass 13.9
Opus Figured Bass Extras 13.9
Opus Function Symbols 18.9
Opus Metronome 20.9
Opus Note Names 20.9
Opus Ornaments 20.9
Opus Percussion 11.9
Opus PlainChords 14.9
Opus Roman Chords 9.9
Opus Special 29.9
Opus Special Extra 20.9
Opus Text 13.9
Palatino Linotype 10.9
Plantagenet Cherokee 13.9
PMingLiU 10.9
PMingLiU-ExtB 10.9
Raavi 17.9
Reprise 10.9
Reprise Chords 16.9
Reprise Metronome 18.9
Reprise Rehearsal 10.9
Reprise Script 10.9
Reprise Special 28.9
Reprise Stamp 10.9
Reprise Text 18.9
Reprise Title 7.9
Rod 10.9
SansSerif 12.9
Segoe Print 17.9
Segoe Script 16.9
Segoe UI 13.9
Serif 12.9
Shruti 17.9
SimHei 10.9
Simplified Arabic 17.9
Simplified Arabic Fixed 11.9
SimSun 10.9
SimSun-ExtB 10.9
Sylfaen 10.9
Symbol 12.9
Tahoma 12.9
Tiger Rag LET 12.9
Times New Roman 11.9
Tiresias Infofont 10.9
Tiresias Infofont Z 10.9
Tiresias Keyfont V2 10.9
Tiresias LPfont 10.9
Tiresias PCfont Z 12.9
TiresiasScreenfont 13.9
Traditional Arabic 15.9
Trebuchet MS 12.9
Tunga 17.9
Verdana 12.9
Vrinda 14.9
Webdings 10.9
Wingdings 11.9
I have implemented a offsetting correction in the JDisplay listings
coloriser system so that fonts are a standard size, despite the font
designer's artistic licence to make them big or small. I have not yet
figured out how to pull this off in CSS.
--
Roedy Green Canadian Mind Products
http://mindprod.com
There is one brain organ that is optimised for understanding and articulating logical processes, and that is the outer layer of the brain, called the cerebral cortex. Unlike the rest of the brain, this relatively recent evolutionary development is rather flat, only about 0.32 cm (0.12 in) thick, and includes a mere 6 million neurons. This elaborately folded organ provides us with what little competence we do possess for understanding what we do and who we do it.
~ Ray Kurzweil (born: 1948-02-12 age: 61)
The variance is quite astounding.
Here is my code to do it.
/**
* get actual height of font
*
* @param FontName name of font
*
* @return true height of a 10 point font in pixels.
*/
float getTrueFontHeight( String FontName )
{
final Font f = new Font( FontName, Font.PLAIN, 10 );
final BufferedImage dummybi = new BufferedImage( 200
/* dummy */,
200
/* dummy */,
BufferedImage.TYPE_4BYTE_ABGR_PRE );
final Graphics2D dummyg2d = dummybi.createGraphics();
final FontRenderContext fr = dummyg2d.getFontRenderContext();
final LineMetrics lm = f.getLineMetrics(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnoprstuvwxyz01234567809()[]{}",
fr );
return lm.getDescent() + lm.getAscent();
}
You can run the code on your own fonts by running the FontShower
applet at http://mindprod.com/applet/fontshower.html
Select the "all fonts summary" option.
Fonts Available to Java under Windows Vista
Font Name True height of a 10 point font
Aharoni 10.9
Andalus 15.9
Angsana New 12.9
AngsanaUPC 12.9
Arabic Typesetting 11.9
Arial 11.9
Arial Black 14.9
Balloon Bd BT 12.9
Balloon Lt BT 11.9
Batang 10.9
BatangChe 10.9
Bitstream Vera Sans 12.9
Bitstream Vera Sans Mono 12.9
Bitstream Vera Serif 12.9
Book Antiqua 12.9
Bookman Old Style 12.9
Bookshelf Symbol 7 10.9
Bradley Hand ITC 12.9
Browallia New 11.9
BrowalliaUPC 11.9
Calibri 10.9
Cambria 12.9
Cambria Math 12.9
Candara 10.9
Comic Sans MS 14.9
Consolas 10.9
Constantia 10.9
Corbel 10.9
Cordia New 11.9
CordiaUPC 11.9
Courier New 11.9
DaunPenh 13.9
David 10.9
DejaVu Sans 12.9
DejaVu Sans Condensed 12.9
DejaVu Sans Light 12.9
DejaVu Sans Mono 12.9
DejaVu Serif 12.9
DejaVu Serif Condensed 12.9
DFKai-SB 10.9
Dialog 12.9
DialogInput 13.9
DilleniaUPC 6.9
DokChampa 12.9
Dotum 10.9
DotumChe 10.9
Estrangelo Edessa 11.9
EucrosiaUPC 6.9
Euphemia 13.9
FangSong 10.9
Franklin Gothic Medium 11.9
FrankRuehl 10.9
FreesiaUPC 6.9
Gautami 17.9
Georgia 11.9
Gisha 12.9
Gulim 10.9
GulimChe 10.9
Gungsuh 10.9
GungsuhChe 10.9
Helsinki 20.9
Helsinki Metronome 20.9
Helsinki Special 29.9
Helsinki Text 13.9
Impact 12.9
Inkpen2 20.9
Inkpen2 Chords 16.9
Inkpen2 Metronome 20.9
Inkpen2 Script 11.9
Inkpen2 Special 29.9
Inkpen2 Text 18.9
IrisUPC 6.9
Iskoola Pota 11.9
JasmineUPC 6.9
KaiTi 10.9
Kalinga 15.9
Kartika 14.9
KodchiangUPC 6.9
Latha 17.9
Leelawadee 12.9
Letter Gothic Line 8.9
Levenim MT 14.9
LilyUPC 10.9
Lucida Bright 12.9
Lucida Console 10.9
Lucida Handwriting 14.9
Lucida Sans 12.9
Lucida Sans Typewriter 12.9
Lucida Sans Unicode 15.9
Malgun Gothic 13.9
Mangal 17.9
Marker Felt Thin Plain 11.9
Marlett 9.9
Meiryo 15.9
Microsoft Himalaya 10.9
Microsoft JhengHei 13.9
Microsoft Sans Serif 11.9
Microsoft Uighur 10.9
Microsoft YaHei 13.9
Microsoft Yi Baiti 10.9
MingLiU 10.9
MingLiU-ExtB 10.9
MingLiU_HKSCS 10.9
MingLiU_HKSCS-ExtB 10.9
Miriam 10.9
Miriam Fixed 10.9
Mongolian Baiti 11.9
Monospaced 13.9
MoolBoran 13.9
MS Gothic 10.9
MS Mincho 10.9
MS PGothic 10.9
MS PMincho 10.9
MS UI Gothic 10.9
MV Boli 16.9
Narkisim 10.9
NSimSun 10.9
Nyala 9.9
OCR A Extended 10.9
OpenSymbol 12.9
Opus 20.9
Opus Chords 13.9
Opus Chords Sans 13.9
Opus Chords Sans Condensed 13.9
Opus Figured Bass 13.9
Opus Figured Bass Extras 13.9
Opus Function Symbols 18.9
Opus Metronome 20.9
Opus Note Names 20.9
Opus Ornaments 20.9
Opus Percussion 11.9
Opus PlainChords 14.9
Opus Roman Chords 9.9
Opus Special 29.9
Opus Special Extra 20.9
Opus Text 13.9
Palatino Linotype 10.9
Plantagenet Cherokee 13.9
PMingLiU 10.9
PMingLiU-ExtB 10.9
Raavi 17.9
Reprise 10.9
Reprise Chords 16.9
Reprise Metronome 18.9
Reprise Rehearsal 10.9
Reprise Script 10.9
Reprise Special 28.9
Reprise Stamp 10.9
Reprise Text 18.9
Reprise Title 7.9
Rod 10.9
SansSerif 12.9
Segoe Print 17.9
Segoe Script 16.9
Segoe UI 13.9
Serif 12.9
Shruti 17.9
SimHei 10.9
Simplified Arabic 17.9
Simplified Arabic Fixed 11.9
SimSun 10.9
SimSun-ExtB 10.9
Sylfaen 10.9
Symbol 12.9
Tahoma 12.9
Tiger Rag LET 12.9
Times New Roman 11.9
Tiresias Infofont 10.9
Tiresias Infofont Z 10.9
Tiresias Keyfont V2 10.9
Tiresias LPfont 10.9
Tiresias PCfont Z 12.9
TiresiasScreenfont 13.9
Traditional Arabic 15.9
Trebuchet MS 12.9
Tunga 17.9
Verdana 12.9
Vrinda 14.9
Webdings 10.9
Wingdings 11.9
I have implemented a offsetting correction in the JDisplay listings
coloriser system so that fonts are a standard size, despite the font
designer's artistic licence to make them big or small. I have not yet
figured out how to pull this off in CSS.
--
Roedy Green Canadian Mind Products
http://mindprod.com
There is one brain organ that is optimised for understanding and articulating logical processes, and that is the outer layer of the brain, called the cerebral cortex. Unlike the rest of the brain, this relatively recent evolutionary development is rather flat, only about 0.32 cm (0.12 in) thick, and includes a mere 6 million neurons. This elaborately folded organ provides us with what little competence we do possess for understanding what we do and who we do it.
~ Ray Kurzweil (born: 1948-02-12 age: 61)