Currently GRUB's default font is too small to see on a HiDPI monitor.
This patch adds preliminary HiDPI support to gfxterm. If default font
and a HiDPI monitor are both detected, it will scale the font size on
the fly.
Signed-off-by: Zhang Boyang
---
grub-core/term/gfxterm.c | 55 +++
Hi,
[PATCH v2] now caches scaled bitmaps in each corresponding glyph. So it
can be reused if same glyph is used many times.
Best Regards,
Zhang Boyang
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
This patch adds an argument 'scale' to grub_font_draw_glyph(). If
scale > 1, then the function will scale the bitmap of the drawing glyph,
and draw the scaled glyph. The scaled bitmap is cached in glyph itself,
so it can be reused if same glyph is used many times.
Signed-off-by: Zhang Boyang
---
On 5/31/22 17:53, Stefan Agner wrote:
Some devices report IoAlign values but seem to require buffers with
higher alignment.
The UEFI specification is saying: "IoAlign values of 0 and 1 mean that
the buffer can be placed anywhere in memory. Otherwise, IoAlign must
be a power of 2, and the require
Some devices report IoAlign values but seem to require buffers with
higher alignment.
The UEFI specification is saying: "IoAlign values of 0 and 1 mean that
the buffer can be placed anywhere in memory. Otherwise, IoAlign must
be a power of 2, and the requirement is that the start address of a
buff
On 2022-05-26 17:27, Daniel Kiper wrote:
> Hey,
>
> On Thu, May 19, 2022 at 09:36:41AM +0200, Stefan Agner wrote:
>> On 2022-05-18 10:59, Stefan Agner wrote:
>> > Some devices report a IoAlign value of 2, however seem to require a
>> > buffer with higher alignment.
>>
>> After releasing Home Assis
Hi,
All scaled glyphs share one buffer, and the static local pointer
'buffer' points to that shared buffer. So the malloc() only occurs when
current glyph size is bigger than all previous glyphs. Once a new buffer
is allocated, future glyphs smaller than current will not require a
malloc().
We should avoid mallocs on every character as mallocs can be slow. Can we
instead save scaled versions and reuse them so that we need to do mallocs
only once per glyph instead of every time it's used?
Le mar. 31 mai 2022, 13:21, Zhang Boyang a
écrit :
> This patch adds an argument 'scale' to gru
Hi,
In fact it is pretty "fast" because only the displayed glyphs are
scaled. That's a very small subset of the whole font. It will be slower
if we scale every glyph when loading the font. Also, the scale factor
are hard to determine at font loading time, because the video driver may
haven't
Hi,
> + /* FIXME: Scale bitmap pixel by pixel is slow */
So how about doing the scaling when loading the font,
so you have to do it only once?
take care,
Gerd
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listi
Currently GRUB's default font is too small to see on a HiDPI monitor.
This patch adds preliminary HiDPI support to gfxterm. If default font
and a HiDPI monitor are both detected, it will scale the font size on
the fly.
Signed-off-by: Zhang Boyang
---
grub-core/term/gfxterm.c | 55 +++
This patch adds an argument 'scale' to grub_font_draw_glyph(). If
scale > 1, then the function will scale the bitmap of the drawing glyph
on the fly, and draw the scaled glyph. The scaled bitmap is placed in a
local static buffer, so it will not affect the glyph or font itself.
Signed-off-by: Zhan
12 matches
Mail list logo