Problem with fonts in different width
Hi,
Unicode characters are split into two sizes, 16x16 and 16x8, and are stored in different files, for example:
f16.pcf.gz -efont-fixed-medium-r-normal--16-160-75-75-c-160-iso10646-1
h16.pcf.gz -efont-fixed-medium-r-normal--16-160-75-75-c-80-iso10646-1
They can be converted to f16.pf2 and h16.pf2. However, only one font can be active at at time. So if we use both full and half width characters, some of them is not displayed properly. The pf2 format seems to allow different font widths. Perhaps the converter should allow multiple input, so that we can merge the two fonts into one pf2 ?
Signature · 1 line
Bean
Quoted 11 lines · On Sun, 4 Jan 2009 01:53:16 +0800 Bean <[email protected]> wrote:
Hi,
Unicode characters are split into two sizes, 16x16 and 16x8, and are stored in different files, for example:
f16.pcf.gz -efont-fixed-medium-r-normal--16-160-75-75-c-160-iso10646-1
h16.pcf.gz -efont-fixed-medium-r-normal--16-160-75-75-c-80-iso10646-1
Quoted 6 lines
They can be converted to f16.pf2 and h16.pf2. However, only one font can be active at at time. So if we use both full and half width characters, some of them is not displayed properly. The pf2 format seems to allow different font widths. Perhaps the converter should allow multiple input, so that we can merge the two fonts into one pf2 ?
This would be fairly simple to do. The font would then effectively be a proportional-width font since the new font engine+gfxterm does not handle "bi-width" fonts in a character-cell environment.
I try adding the multiple font input feature when I have a chance. Vesa wants the convert re-implemented in C, though, which will take some time.
Regards,
Colin
Quoted 3 lines · Colin D Bennett
This would be fairly simple to do. The font would then effectively be a proportional-width font since the new font engine+gfxterm does not handle "bi-width" fonts in a character-cell environment.
Actually it does :)... In a way at least.
If you have lets say Hiragana glyphs which take 2 cells space will be displayed and acted like taking two normal characters.
Basically the algorithm is:
// determine normal cell width by analyzing ASCII character dimensions normal_cell_width = max_width(glyphs[32..127]);
glyph_chars = (glyph.width + normal_cell_width - 1) / normal_cell_width;
Quoted 11 lines · Bean
Hi,
Unicode characters are split into two sizes, 16x16 and 16x8, and are stored in different files, for example:
f16.pcf.gz -efont-fixed-medium-r-normal--16-160-75-75-c-160-iso10646-1
h16.pcf.gz -efont-fixed-medium-r-normal--16-160-75-75-c-80-iso10646-1
Quoted 6 lines
They can be converted to f16.pf2 and h16.pf2. However, only one font can be active at at time. So if we use both full and half width characters, some of them is not displayed properly. The pf2 format seems to allow different font widths. Perhaps the converter should allow multiple input, so that we can merge the two fonts into one pf2 ?
At least unifont.bdf file contains different size glyphs. I tried with multiple different glyph formats and it seems to include all glyphs I have tried. It is supposed that font file itself has every font needed.
If your distribution does not feature unifont you can grab one from here: