/* Common setup for glyphshow and .glyphwidth. */ static int glyph_show_setup(i_ctx_t *i_ctx_p, gs_glyph *pglyph) { os_ptr op = osp; switch (gs_currentfont(igs)->FontType) { case ft_CID_encrypted: case ft_CID_user_defined: case ft_CID_TrueType: case ft_CID_bitmap: check_int_leu(*op, gs_max_glyph - gs_min_cid_glyph); *pglyph = (gs_glyph) op->value.intval + gs_min_cid_glyph; break; default: check_type(*op, t_name); *pglyph = name_index(imemory, op); } return op_show_enum_setup(i_ctx_p); }
/* Don't change any state yet. */ int op_show_setup(i_ctx_t *i_ctx_p, os_ptr op) { check_read_type(*op, t_string); return op_show_enum_setup(i_ctx_p); }