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 been loaded at that time.
It is possible to cache the scaled glyphs, so only one scaling pass is
needed for one glyph. But this will not change the computational
complexity because the drawing algorithm itself is O(n) and scaling is
also O(n). So I think we can optimize later if this simple-but-slow
scaling code become performance bottleneck.
Best Regards,
Zhang Boyang
On 2022/5/31 19:36, Gerd Hoffmann wrote:
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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel