static void fz_print_style(fz_output *out, fz_text_style *style) { char *s = strchr(style->font->name, '+'); s = s ? s + 1 : style->font->name; fz_printf(out, "span.s%d{font-family:\"%s\";font-size:%gpt;", style->id, s, style->size); if (font_is_italic(style->font)) fz_printf(out, "font-style:italic;"); if (font_is_bold(style->font)) fz_printf(out, "font-weight:bold;"); fz_printf(out, "}\n"); }
static void fz_print_style(fz_context *ctx, fz_output *out, fz_stext_style *style) { const char *name = fz_font_name(ctx, style->font); const char *s = strchr(name, '+'); s = s ? s + 1 : name; fz_printf(ctx, out, "span.s%d{font-family:\"%s\";font-size:%gpt;", style->id, s, style->size); if (font_is_italic(ctx, style->font)) fz_printf(ctx, out, "font-style:italic;"); if (font_is_bold(ctx, style->font)) fz_printf(ctx, out, "font-weight:bold;"); fz_printf(ctx, out, "}\n"); }