1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 04:57:45 +00:00

LibPDF: Stop calculating code points for glyphs

When rendering text, a sequence of bytes corresponds to a glyph, but not
necessarily to a character. This misunderstanding permeated through the
Encoding through to the Font classes, which were all trying to calculate
such values. Moreover, this was done only to identify "space"
characters/glyphs, which were getting a special treatment (e.g., avoid
rendering). Spaces are not special though -- there might be fonts that
render something for them -- and thus should not be skipped
This commit is contained in:
Rodrigo Tobar 2023-01-23 22:07:04 +08:00 committed by Andreas Kling
parent 7c42d6c737
commit fb0c3a9e18
8 changed files with 1 additions and 43 deletions

View file

@ -39,7 +39,6 @@ public:
virtual ~PDFFont() = default;
virtual u32 char_code_to_code_point(u16 char_code) const = 0;
virtual float get_char_width(u16 char_code) const = 0;
virtual void draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint point, float width, u32 char_code, Color color) = 0;