Suppose you want to use a font that's 12 pixels (not 12 points)
Arial. How would you do it? It seems like the answer has
something to do with FontRenderContext and AffineTransform
but does anybody have code that creates a font with a size in
pixels, or measures the size in pixels of an existing font?
Thanks.
The basic problem here is what a 12 point font really is. The point size
of a font is actually the design distance from the baseline of one row
of text to the baseline of the next row of text including the designed
whitespace between the rows of characters. The actual height of an upper
case A in most fonts is about 70% to 75% of the point size. Also a point
is only approximated by and not exactly equal to 1/72 of an inch and is
independent of the size of a pixel. A 12 pixel font on a 4800 dpi image
setter would be very small. A 12 pixel font would also be a different
size if a monitor was at 100 pixels/inch instead of 75 pixels/inch.
Re: How to swee youtube videos, ... For what it's worth, US-ASCII has always been inadequate, even for plain ... Yep, despite what many would think, English, itself, uses ... The mess of font selection in Mozilla isn't their own fault? ... the pixel as the size (it's scaled, ... (Fedora)
Re: Vector Graphics - was MFC and GDI+ ... The solution is to use a music font;... which can end up being either one pixel or two pixels wide depending on the layout. ...Vector GRAPHICS representations of musical symbols don't work well because the mappings to ... Nowadays printers generally gave a better resolution,... (microsoft.public.vc.mfc)
Re: Find The Text :-) ... Actually, although what I am about to say has nothing whatsoever to do with the problem you have noticed, the default font point size on your system is not 8! ... That's because Windows requires all font sizes to be a size that equates to a "whole pixel value" on the specified output device and at the standard 96 dpi screen setting a font size of 8 points would be the equivalent of 8/72*96 = 10.67 pixels. ... There are occasions when the width and height of rectangle is dealt with differently by different pieces of code. ... However, the "glyphs" of most characters (the parts of the character cell that are black in black text) do not actually occupy the entire character cell and there is some "white space" within the cell, some at the top and some at the bottom and a little bit less at both sides, and sometimes "the black bits" even extend outside of the cell they occupy. ... (microsoft.public.vb.general.discussion)
Re: Find The Text :-) ... with the problem you have noticed, the default font point size on your ... That value is not allowed, because it is not a "whole pixel" value, and so ... the "glyphs" of most characters (the parts of the character cell... (microsoft.public.vb.general.discussion)
Re: Rasterizer differences win98/XP ...monitors plenty of times... ... vertically at the pixel's center, horizontally spaced by 1/n pixels, with relative weights of n*) where x is the horizontal offset from the center of the pixel in pixels. ... I still suspect that your font was subjected to grid-fitting in Windows 98, ... Indeed, upon closer inspection, Windows 98's font smoother only produces 3 shades between text and background color, wheras your sample produces 15. ... (comp.fonts)