mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 09:08:16 +02:00
TrueType Subsetting: Remove post table
The post table is not used now that TrueType fonts are embedded in PDF as CID fonts.
This commit is contained in:
parent
67e752f75f
commit
6a42ddf0f9
1 changed files with 1 additions and 33 deletions
|
|
@ -712,37 +712,6 @@ cairo_truetype_font_write_maxp_table (cairo_truetype_font_t *font,
|
|||
return font->status;
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
cairo_truetype_font_write_post_table (cairo_truetype_font_t *font,
|
||||
unsigned long tag)
|
||||
{
|
||||
char buf[10];
|
||||
int n;
|
||||
unsigned i;
|
||||
|
||||
cairo_truetype_font_write_be32 (font, 0x00020000);
|
||||
cairo_truetype_font_write_be32 (font, 0);
|
||||
cairo_truetype_font_write_be16 (font, 0);
|
||||
cairo_truetype_font_write_be16 (font, 1);
|
||||
cairo_truetype_font_write_be32 (font, 0);
|
||||
cairo_truetype_font_write_be32 (font, 0);
|
||||
cairo_truetype_font_write_be32 (font, 0);
|
||||
cairo_truetype_font_write_be32 (font, 0);
|
||||
cairo_truetype_font_write_be32 (font, 0);
|
||||
cairo_truetype_font_write_be16 (font, font->base.num_glyphs);
|
||||
cairo_truetype_font_write_be16 (font, 0);
|
||||
for (i = 1; i < font->base.num_glyphs; i++)
|
||||
cairo_truetype_font_write_be16 (font, i + 257);
|
||||
|
||||
for (i = 1; i < font->base.num_glyphs; i++) {
|
||||
n = snprintf(buf + 1, 9, "g%d", i - 1);
|
||||
buf[0] = n;
|
||||
cairo_truetype_font_write (font, buf, n + 1);
|
||||
}
|
||||
|
||||
return font->status;
|
||||
}
|
||||
|
||||
typedef struct table table_t;
|
||||
struct table {
|
||||
unsigned long tag;
|
||||
|
|
@ -769,8 +738,7 @@ static const table_t truetype_tables[] = {
|
|||
{ TT_TAG_loca, cairo_truetype_font_write_loca_table, 7 },
|
||||
{ TT_TAG_maxp, cairo_truetype_font_write_maxp_table, 8 },
|
||||
{ TT_TAG_name, cairo_truetype_font_write_generic_table, 9 },
|
||||
{ TT_TAG_post, cairo_truetype_font_write_post_table, 10 },
|
||||
{ TT_TAG_prep, cairo_truetype_font_write_generic_table, 11 },
|
||||
{ TT_TAG_prep, cairo_truetype_font_write_generic_table, 10 },
|
||||
};
|
||||
|
||||
static cairo_status_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue