コード例 #1
0
ファイル: type0.c プロジェクト: YandYTeX/ptex-ng
static pdf_obj *
Type0Font_create_ToUnicode_stream(Type0Font *font) {
  CIDFont *cidfont = font->descendant;
  char *used = Type0Font_get_usedglyphs(font);
  if (!used)
    used = Type0Font_get_usedchars(font);

  return otf_create_ToUnicode_stream(CIDFont_get_ident(cidfont),
                                     CIDFont_get_opt_index(cidfont),
                                     used,
                                     font->cmap_id);
}
コード例 #2
0
ファイル: pdffont.c プロジェクト: Nathan22Miles/sile-0.9.1
char *
texpdf_get_font_usedchars (int font_id)
{
  pdf_font *font;

  CHECK_ID(font_id);

  font = GET_FONT(font_id);
  if (font->subtype == PDF_FONT_FONTTYPE_TYPE0) {
    Type0Font *t0font;

    t0font = Type0Font_cache_get(font->font_id);
    return Type0Font_get_usedchars(t0font);
  } else {
    if (!font->usedchars) {
      font->usedchars = NEW(256, char);
      memset(font->usedchars, 0, 256 * sizeof(char));
    }
    return font->usedchars;
  }