All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with fonts in different width
@ 2009-01-03 17:53 Bean
  2009-01-03 18:06 ` Colin D Bennett
  2009-01-03 19:30 ` Vesa Jääskeläinen
  0 siblings, 2 replies; 4+ messages in thread
From: Bean @ 2009-01-03 17:53 UTC (permalink / raw)
  To: The development of GRUB 2

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
?

-- 
Bean



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with fonts in different width
  2009-01-03 17:53 Problem with fonts in different width Bean
@ 2009-01-03 18:06 ` Colin D Bennett
  2009-01-03 19:27   ` Vesa Jääskeläinen
  2009-01-03 19:30 ` Vesa Jääskeläinen
  1 sibling, 1 reply; 4+ messages in thread
From: Colin D Bennett @ 2009-01-03 18:06 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: bean123ch

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

On Sun, 4 Jan 2009 01:53:16 +0800
Bean <bean123ch@gmail.com> 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
> 
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with fonts in different width
  2009-01-03 18:06 ` Colin D Bennett
@ 2009-01-03 19:27   ` Vesa Jääskeläinen
  0 siblings, 0 replies; 4+ messages in thread
From: Vesa Jääskeläinen @ 2009-01-03 19:27 UTC (permalink / raw)
  To: The development of GRUB 2

Colin D Bennett wrote:
> 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;




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with fonts in different width
  2009-01-03 17:53 Problem with fonts in different width Bean
  2009-01-03 18:06 ` Colin D Bennett
@ 2009-01-03 19:30 ` Vesa Jääskeläinen
  1 sibling, 0 replies; 4+ messages in thread
From: Vesa Jääskeläinen @ 2009-01-03 19:30 UTC (permalink / raw)
  To: The development of GRUB 2

Bean 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
> 
> 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:

http://unifoundry.com/unifont-5.1.20080820.bdf.gz



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-03 19:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-03 17:53 Problem with fonts in different width Bean
2009-01-03 18:06 ` Colin D Bennett
2009-01-03 19:27   ` Vesa Jääskeläinen
2009-01-03 19:30 ` Vesa Jääskeläinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.