mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:37:45 +00:00
LibPDF: Stub out type3_font_set_glyph_width*
Type 3 font glyphs begin with either `d0` or `d1`. If we bail out with an "unsupported" error on the very first operator in a glyph, we'll never paint the glyph. Just stub these out for now. We probably want to do more in here in the future (see "TABLE 5.10 Type 3 font operators" in the 1.7 spec).
This commit is contained in:
parent
54c98a46d8
commit
14ddab5519
2 changed files with 13 additions and 3 deletions
|
@ -55,8 +55,9 @@ void Type3Font::set_font_size(float)
|
|||
|
||||
PDFErrorOr<void> Type3Font::draw_glyph(Gfx::Painter&, Gfx::FloatPoint, float, u8 char_code, Renderer const&)
|
||||
{
|
||||
// PDF 1.7 spec, 5.5.4 Type 3 Fonts:
|
||||
// "For each character code shown by a text-showing operator that uses a Type 3 font,
|
||||
// the consumer application does the following:""
|
||||
// the consumer application does the following:"
|
||||
|
||||
// "1. Looks up the character code in the font’s Encoding entry, as described in Sec-
|
||||
// tion 5.5.5, “Character Encoding,” to obtain a character name."
|
||||
|
|
|
@ -559,8 +559,17 @@ RENDERER_HANDLER(text_show_string_array)
|
|||
return {};
|
||||
}
|
||||
|
||||
RENDERER_TODO(type3_font_set_glyph_width)
|
||||
RENDERER_TODO(type3_font_set_glyph_width_and_bbox)
|
||||
RENDERER_HANDLER(type3_font_set_glyph_width)
|
||||
{
|
||||
// FIXME: Do something with this.
|
||||
return {};
|
||||
}
|
||||
|
||||
RENDERER_HANDLER(type3_font_set_glyph_width_and_bbox)
|
||||
{
|
||||
// FIXME: Do something with this.
|
||||
return {};
|
||||
}
|
||||
|
||||
RENDERER_HANDLER(set_stroking_space)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue