"   /FontName /%s\r\n" "   /Flags 32\r\n"
"   /FontName /7%s\r\n" "   /Flags 4\r\n"
_cairo_pdf_document_write_fonts (cairo_pdf_document_t *document){    FILE *file = document->file;    cairo_pdf_font_t *font;    int num_fonts, i, j;    const char *data;    char *compressed;    unsigned long data_size, compressed_size;    unsigned int stream_id, descriptor_id;    cairo_status_t status = CAIRO_STATUS_SUCCESS;    num_fonts = _cairo_array_num_elements (&document->fonts);    for (i = 0; i < num_fonts; i++) {	_cairo_array_copy_element (&document->fonts, i, &font);	status = cairo_pdf_font_generate (font, &data, &data_size);	if (status)	    goto fail;	compressed = compress_dup (data, data_size, &compressed_size);	if (compressed == NULL) {	    status = CAIRO_STATUS_NO_MEMORY;	    goto fail;	}	stream_id = _cairo_pdf_document_new_object (document);	fprintf (file,		 "%d 0 obj\r\n"		 "<< /Filter /FlateDecode\r\n"		 "   /Length %lu\r\n"		 "   /Length1 %lu\r\n"		 ">>\r\n"		 "stream\r\n",		 stream_id,		 compressed_size,		 data_size);	fwrite (compressed, 1, compressed_size, file);	fprintf (file,		 "\r\n"		 "endstream\r\n"		 "endobj\r\n");	free (compressed);	descriptor_id = _cairo_pdf_document_new_object (document);	fprintf (file,		 "%d 0 obj\r\n"		 "<< /Type /FontDescriptor\r\n"		 "   /FontName /%s\r\n"		 "   /Flags 32\r\n"		 "   /FontBBox [ %ld %ld %ld %ld ]\r\n"		 "   /ItalicAngle 0\r\n"		 "   /Ascent %ld\r\n"		 "   /Descent %ld\r\n"		 "   /CapHeight 500\r\n"		 "   /StemV 80\r\n"		 "   /StemH 80\r\n"		 "   /FontFile2 %u 0 R\r\n"		 ">>\r\n"		 "endobj\r\n",		 descriptor_id,		 font->base_font,		 font->x_min,		 font->y_min,		 font->x_max,		 font->y_max,		 font->ascent,		 font->descent,		 stream_id);	_cairo_pdf_document_update_object (document, font->font_id);	fprintf (file,		 "%d 0 obj\r\n"		 "<< /Type /Font\r\n"		 "   /Subtype /TrueType\r\n"		 "   /BaseFont /%s\r\n"		 "   /FirstChar 0\r\n"		 "   /LastChar %d\r\n"		 "   /FontDescriptor %d 0 R\r\n"		 "   /Widths ",		 font->font_id,		 font->base_font,		 font->num_glyphs,		 descriptor_id);	fprintf (file,		 "[");	for (j = 0; j < font->num_glyphs; j++)	    fprintf (file,		     " %d",		     font->widths[j]);	fprintf (file,		 " ]\r\n"		 ">>\r\n"		 "endobj\r\n");    fail:	cairo_pdf_ft_font_destroy (font);    }    return status;}