a java JComponent that can render a Font character in pixels
I am wondering if such a java component even exists, please allow me to elaborate.
The component is supposed to be a grid-like component, derived from JComponent. The main face is a grid, and it will be used to render a font character. The grid is divided based on the size of the input font character. For instance, if the input is a "A" of "Arial, PLAIN, 16", the grid will have 16X16 cells, each cell represents a pixel of the character, only much larger than the real pixel, and the character is rendered inside the grid. Of cause a char of 16 pixel is too small to be seen clearly in its real size, so the grid panel actually magnifies it. Also, user can change the font size on the fly, say from 16 to 32, the grid panel doesn't change its size, only re-divide the cells into 32X32, and redraw the character, simulating a 32X32 pixel char.
I guess painting software has something like that, I just wonder if there is such a component out there in Java, open source or comme开发者_如何学Crcial, otherwise I have to take great pain to create one myself :-).
Thanks, John
You can get a glyph's bitmap, as mentioned here, and edit it, as suggested here.
精彩评论