w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

aftopl.c File Reference
#include "util.h"
Include dependency graph for aftopl.c:

Go to the source code of this file.

Classes

struct  ligatures
 
struct  lig_kern_list
 

Macros

#define MAXNAMES   500
 
#define NOT_DEFINED   100000.0
 
#define PI   3.14159265358979324
 
#define bad_afm_file()
 

Functions

int lookup (const char *)
 
char * getkeyvalue (char *, char)
 
void scan_char_metric (char *)
 
void compute_font_dimens (void)
 
void do_kern_pairs (int)
 
void do_char_metrics (int)
 
void do_afms (void)
 
void print_font_dimens (void)
 
void do_encoding (char *)
 
void print_char_metrics (void)
 
void print_lig_kerns (void)
 
void do_ligatures (struct ligatures *)
 
int lookup (char *s) const
 
int main (int argc, char **argv)
 

Variables

static char rcsid [] = "$Header: /u/jjc/dvitops/RCS/aftopl.c,v 1.3 89/02/22 11:40:31 jjc Rel $"
 
char * program_name = "aftopl"
 
static int lineno = 0
 
FILEinfp
 
FILEoutfp
 
struct {
   struct lig_kern_list *   p
 
   char *   name
 
   int   code
 
   double   llx
 
   double   lly
 
   double   urx
 
   double   ury
 
   double   wx
 
table [500]
 
struct {
   int   is_fixed_pitch
 
   double   italic_angle
 
   double   x_height
 
   double   italic_correction_space
 
   double   normal_space
 
   double   normal_stretch
 
   double   normal_shrink
 
   double   extra_space
 
   double   quad
 
   double   slant
 
font
 
struct ligatures standard_ligatures []
 
struct ligatures tt_ligatures []
 

Macro Definition Documentation

◆ bad_afm_file

#define bad_afm_file ( )
Value:
{fprintf(stderr, "bad afm file, line %d\n", lineno);\
exit(100);}
static int lineno
Definition: aftopl.c:19
#define fprintf
Definition: mendex.h:64

Definition at line 38 of file aftopl.c.

◆ MAXNAMES

#define MAXNAMES   500

Definition at line 5 of file aftopl.c.

◆ NOT_DEFINED

#define NOT_DEFINED   100000.0

Definition at line 6 of file aftopl.c.

◆ PI

#define PI   3.14159265358979324

Definition at line 8 of file aftopl.c.

Function Documentation

◆ compute_font_dimens()

void compute_font_dimens ( void  )

Definition at line 191 of file aftopl.c.

References exit(), fprintf, if, lookup(), n, NOT_DEFINED, PI, and sin().

Referenced by main().

◆ do_afms()

void do_afms ( void  )

Definition at line 287 of file aftopl.c.

References atof(), atoi(), buf, do_char_metrics(), do_kern_pairs(), fgets, infp, isspace, key, lineno, NULL, p, and strcmp().

Referenced by main().

◆ do_char_metrics()

void do_char_metrics ( int  n)

Definition at line 265 of file aftopl.c.

References bad_afm_file, buf, fgets, fprintf, infp, isspace, lineno, n, NULL, ptr, scan_char_metric(), and strcmp().

Referenced by do_afms().

◆ do_encoding()

void do_encoding ( char *  encoding)

Definition at line 345 of file aftopl.c.

References buff, exit(), fgets, FILE, fopen, fp, fprintf, free, i, kpse_enc_format, lookup(), MAXNAMES, n, name, NULL, outfp, p, q, strcmp(), strcpy(), stricmp, and strrchr.

Referenced by main().

◆ do_kern_pairs()

void do_kern_pairs ( int  n)

Definition at line 224 of file aftopl.c.

References bad_afm_file, buf, exit(), fgets, fprintf, i, infp, lineno, lookup(), malloc, n, NULL, ptr, sscanf(), strcmp(), cordic::x, and y.

Referenced by do_afms().

◆ do_ligatures()

void do_ligatures ( struct ligatures lig)

Definition at line 489 of file aftopl.c.

References ch, exit(), fprintf, i, lig_kern_list::lig, lookup(), malloc, n, lig_kern_list::next, NULL, p, and lig_kern_list::succ.

Referenced by main().

◆ getkeyvalue()

char * getkeyvalue ( char *  s,
char  c 
)

Definition at line 105 of file aftopl.c.

References c, isspace, NULL, and s.

Referenced by scan_char_metric().

◆ lookup() [1/2]

int lookup ( char *  s) const

Definition at line 78 of file aftopl.c.

References exit(), fprintf, i, malloc, MAXNAMES, name, NULL, s, strcmp(), strcpy(), and strlen().

◆ lookup() [2/2]

◆ main()

◆ print_char_metrics()

void print_char_metrics ( void  )

Definition at line 410 of file aftopl.c.

References fprintf, fputs, i, lly, MAXNAMES, name, NULL, outfp, ury, and wx.

Referenced by main().

◆ print_font_dimens()

void print_font_dimens ( void  )

Definition at line 331 of file aftopl.c.

References fprintf, and outfp.

Referenced by main().

◆ print_lig_kerns()

void print_lig_kerns ( void  )

Definition at line 437 of file aftopl.c.

References fprintf, fputs, i, lig_kern_list::lig, MAXNAMES, name, lig_kern_list::next, NULL, outfp, p, sprintf, lig_kern_list::succ, and lig_kern_list::x.

Referenced by main().

◆ scan_char_metric()

void scan_char_metric ( char *  s)

Definition at line 119 of file aftopl.c.

References bad_afm_file, code, exit(), fprintf, getkeyvalue(), isspace, llx, lly, lookup(), malloc, n, name, NULL, p, ptr, s, sscanf(), strchr, urx, ury, and wx.

Referenced by do_char_metrics().

Variable Documentation

◆ code

Definition at line 52 of file aftopl.c.

Referenced by _Escape(), _EscIO(), _EscIO2(), _file_lock(), _SCSUFromUnicode(), _SCSUFromUnicodeWithOffsets(), add_metrics(), add_preview(), add_SimpleMetrics(), CharCodeToUnicode::addMapping(), CharCodeToUnicode::addMappingInt(), append_unicode(), Machine::Code::decoder::apply_analysis(), Metrics::assign_emap(), BackwardMatchLengthCode(), base85_decode(), base85_decode_state(), base85_encode(), base85_encode_ln(), base85_encode_state(), base85_encode_state_ln(), base85_encoded(), base85_encoded_ln(), Metrics::base_code(), Metrics::base_glyph(), bdf_cmap_char_index(), bdf_cmap_char_next(), SplashOutputDev::beginType3Char(), BlockLengthPrefixCode(), BrotliStoreHuffmanTree(), cf2_getSeacComponent(), cff_cmap_encoding_char_next(), cff_parser_init(), cff_parser_run(), Metrics::check(), check_cmap_uvs(), check_postamble(), check_unicode_value(), checkOctave(), CIDFont_type2_dofont(), CmdCite(), Metrics::code_name(), codeCvt(), codepoint(), FlateStream::compHuffmanCodes(), compile(), compress_block(), compute_image_info(), cons_cmds(), deltarow(), do_builtin_encoding(), do_custom_encoding(), do_pk_font(), do_widths(), Gfx::doShowText(), SplashOutputDev::doUpdateFont(), PSOutputDev::drawString(), AnnotAppearanceBuilder::drawText(), durationCode(), EmitCopyLen(), EmitCopyLenLastDistance(), EmitInsertLen(), Metrics::encode(), Metrics::encode_virtual(), Ghostscript::error_name(), Fax3PutEOL(), LZWEncoder::fillBuf(), FillTable(), findAlgName(), FindLongestMatch(), fix_CJK_symbols(), fontfcnB(), ft_lzwstate_io(), GenBlockPattern(), Generate_Font(), GenMBAddrIncr(), GenMBType(), GenMotionCode(), CFF::Encoding1::get_code(), get_dvi_fonts(), get_font_list(), get_gs_string_product(), JBIG2MMRDecoder::getBlackCode(), CCITTFaxStream::getBlackCode(), GetBlockLengthPrefixCode(), Gfx8BitFont::getCharName(), LZWStream::getCode(), Gfx8BitFont::getCodeToGIDMap(), GfxCIDFont::getCodeToGIDMap(), getctype(), FlateStream::getHuffmanCodeWord(), GfxCIDFont::getNextChar(), CairoFont::getSubstitutionCorrection(), CCITTFaxStream::getTwoDimCode(), GetType1CharString(), JBIG2MMRDecoder::getWhiteCode(), CCITTFaxStream::getWhiteCode(), Gfx8BitFont::Gfx8BitFont(), Metrics::glyph(), OT::cff1::accelerator_templ_t< PRIVOPSET, PRIVDICTVAL >::glyph_to_code(), is_similar_charset(), iter_aux(), jfm_make_charmap(), jpeg_huff_decode(), jpeg_make_c_derived_tbl(), jpeg_make_d_derived_tbl(), load_encoding_file(), OT::cff1::lookup_standard_encoding_for_sid(), LWZReadByte(), LWZReadByte_(), lzw_decode_state(), LZWDecode(), LZWDecodeCompat(), LZWSetupDecode(), main(), DvipsEncoding::make_base_mappings(), make_encoding_differences(), make_eps_copy(), make_eps_interchange(), make_eps_metafile(), make_eps_tiff(), DvipsEncoding::make_metrics(), UnicodeMap::mapUnicode(), metafile_init(), mp_rle_huff_block(), mp_rle_huff_pblock(), Mpost_RLEHuffIBlock(), Mpost_RLEHuffPBlock(), mt_exit(), Metrics::nonvirtual_code(), normalizationCorrectionsLineFn(), OTF_get_unicode(), output(), FoFiType1::parse(), CMap::parse2(), parse_encoding(), GlobalParams::parseBind(), GlobalParams::parseUnbind(), pdf_check_tfm_widths(), pdf_clean_encoding_struct(), pdf_create_ToUnicode_CMap(), pdf_encoding_add_usedchars(), pdf_encoding_new_encoding(), pdf_font_load_pkfont(), pdf_font_load_type1(), pdf_font_load_type1c(), pfr_lookup_bitmap_data(), cff_subset_plan::plan_subset_encoding(), ppscan_base85_decode(), PsSpecialHandler::process(), process_vf_file(), LZWStream::processNextCode(), PS_Head(), put_ch(), putcode(), putspan(), pxl_define(), woff2::Read255UShort(), Read255UShort(), read_post(), ReadBase128(), FlateStream::readDynamicCodes(), DCTStream::readHuffmanTables(), DCTStream::readHuffSym(), readmetrics(), s_work(), scan_char_metric(), scriptNameToCode(), set_glyph_unicode(), CMap::setReverseMapVector(), Metrics::setting(), PSOutputDev::setupExternalCIDTrueTypeFont(), PSOutputDev::setupExternalOpenTypeCFFFont(), PSOutputDev::setupFont(), StoreCommands(), str_reverse(), strprepProfileLineFn(), t1_cmap_std_char_index(), t1_get_standard_glyph(), TextFontInfo::TextFontInfo(), tr_static_init(), trans2dvi(), transpost(), tt_name_ascii_from_other(), tt_name_ascii_from_utf16(), u_errorName_68(), ucurr_getNumericCode_68(), Metrics::unicode(), unicode_init_user(), TextPage::updateFont(), HtmlPage::updateFont(), utf8_deco(), utf8_oced(), Metrics::was_base_glyph(), write_cff(), write_interchange(), write_metafile(), write_tiff(), writevf(), writevfu(), and XML_ErrorString().

◆ extra_space

double extra_space

◆ 

font { ... } struct
Initial value:
= { 0, 0.0, 100000.0 , 100000.0 , 100000.0 , 100000.0 ,
100000.0 , 100000.0 , 100000.0 , 100000.0 }

◆ infp

FILE* infp

Definition at line 21 of file aftopl.c.

Referenced by do_afms(), do_char_metrics(), do_kern_pairs(), dvi_init(), main(), and ReadImageChannel().

◆ is_fixed_pitch

int is_fixed_pitch

Definition at line 61 of file aftopl.c.

◆ italic_angle

double italic_angle

Definition at line 62 of file aftopl.c.

◆ italic_correction_space

double italic_correction_space

Definition at line 66 of file aftopl.c.

◆ lineno

◆ llx

◆ lly

◆ name

char* name

Definition at line 51 of file aftopl.c.

Referenced by do_encoding(), lookup(), print_char_metrics(), print_lig_kerns(), and scan_char_metric().

◆ normal_shrink

double normal_shrink

Definition at line 69 of file aftopl.c.

◆ normal_space

double normal_space

Definition at line 67 of file aftopl.c.

◆ normal_stretch

double normal_stretch

Definition at line 68 of file aftopl.c.

◆ outfp

◆ p

struct lig_kern_list* p

Definition at line 50 of file aftopl.c.

Referenced by do_afms(), do_encoding(), do_ligatures(), print_lig_kerns(), and scan_char_metric().

◆ program_name

char* program_name = "aftopl"

Definition at line 17 of file aftopl.c.

◆ quad

◆ rcsid

char rcsid[] = "$Header: /u/jjc/dvitops/RCS/aftopl.c,v 1.3 89/02/22 11:40:31 jjc Rel $"
static

Definition at line 1 of file aftopl.c.

◆ slant

double slant

Definition at line 72 of file aftopl.c.

◆ standard_ligatures

struct ligatures standard_ligatures[]
Initial value:
= {
"hyphen", "hyphen", "endash",
"endash", "hyphen", "emdash",
"quoteleft", "quoteleft", "quotedblleft",
"quoteright", "quoteright", "quotedblright",
"exclam", "quoteleft", "exclamdown",
"question", "quoteleft", "questiondown",
}
#define NULL
Definition: ftobjs.h:61

Definition at line 437 of file aftopl.c.

Referenced by main().

◆ 

table[ 500 ] { ... } struct

Referenced by _cairo_lzw_compress(), _EBCDICSwapLFNL(), _get_table(), FontTableCache::add(), CollationSettings::aliasReordering(), BrotliEncoderCompressStreamFast(), build_channels(), build_equiv_class(), CollationDataBuilder::buildFastLatinTable(), check_table_dir(), CmdTabbing(), CmdTabular(), woff2::ConvertTTFToWOFF2(), createSegment(), do_file(), emit_binding_table(), EncodeData(), encoding2u_strncpy(), FcCompareDataInit(), FcFontSetList(), fdFromJson(), FontTableCache::find(), FT_Get_Sfnt_Table(), GDEF_Create(), get_sfnt_table(), get_voiced_sound(), XeTeXFontInst::getFontTable(), GetHashTable(), getloadavg(), getNamePtrFromTable(), getTableItemByKeyPath(), GPOS_Create(), GSUB_Create(), gww_iconv(), gxv_array_getlimits_byte(), gxv_array_getlimits_ushort(), gxv_BinSrchHeader_validate(), gxv_bsln_validate(), gxv_ClassTable_validate(), gxv_EntryTable_validate(), gxv_feat_name_index_validate(), gxv_feat_name_validate(), gxv_feat_setting_validate(), gxv_feat_validate(), gxv_just_actSubrecord_type0_validate(), gxv_just_actSubrecord_type1_validate(), gxv_just_actSubrecord_type2_validate(), gxv_just_actSubrecord_type4_validate(), gxv_just_actSubrecord_type5_validate(), gxv_just_actSubrecord_validate(), gxv_just_justClassTable_validate(), gxv_just_justData_lookuptable_validate(), gxv_just_justData_validate(), gxv_just_pcActionRecord_validate(), gxv_just_pcLookupTable_validate(), gxv_just_postcompTable_validate(), gxv_just_validate(), gxv_just_wdc_entry_validate(), gxv_just_wdp_entry_validate(), gxv_just_widthDeltaClusters_validate(), gxv_kern_subtable_fmt0_pairs_validate(), gxv_kern_subtable_fmt1_validate(), gxv_kern_subtable_fmt1_valueTable_load(), gxv_kern_subtable_fmt2_clstbl_validate(), gxv_kern_subtable_validate(), gxv_kern_validate_generic(), gxv_lcar_validate(), gxv_LookupTable_fmt0_validate(), gxv_LookupTable_fmt2_skip_endmarkers(), gxv_LookupTable_fmt2_validate(), gxv_LookupTable_fmt4_validate(), gxv_LookupTable_fmt6_skip_endmarkers(), gxv_LookupTable_fmt6_validate(), gxv_LookupTable_fmt8_validate(), gxv_LookupTable_validate(), gxv_mort_chain_validate(), gxv_mort_featurearray_validate(), gxv_mort_subtable_type0_validate(), gxv_mort_subtable_type1_substitutionTable_load(), gxv_mort_subtable_type1_substTable_validate(), gxv_mort_subtable_type1_validate(), gxv_mort_subtable_type2_opttable_load(), gxv_mort_subtable_type2_validate(), gxv_mort_subtable_type4_validate(), gxv_mort_subtable_type5_validate(), gxv_mort_subtables_validate(), gxv_mort_validate(), gxv_morx_chain_validate(), gxv_morx_subtable_type0_validate(), gxv_morx_subtable_type1_substitutionTable_load(), gxv_morx_subtable_type1_substitutionTable_validate(), gxv_morx_subtable_type1_validate(), gxv_morx_subtable_type2_opttable_load(), gxv_morx_subtable_type2_validate(), gxv_morx_subtable_type5_insertionGlyphList_load(), gxv_morx_subtable_type5_validate(), gxv_morx_subtables_validate(), gxv_morx_validate(), gxv_opbd_validate(), gxv_prop_validate(), gxv_StateArray_validate(), gxv_StateTable_validate(), gxv_trak_trackData_validate(), gxv_trak_trackTable_validate(), gxv_trak_validate(), gxv_XEntryTable_validate(), gxv_XStateArray_validate(), gxv_XStateTable_validate(), inflate_table(), init_error_limit(), initAliasData(), Kerning_Create(), Load_TrueType_Any(), Load_TrueType_Eblc(), Load_TrueType_Glyph(), Load_TrueType_Hdmx(), MacEncToUnicode(), MacStrToUtf8(), main(), make_val_table(), MBCS_FROM_UCHAR32_ISO2022(), MBCS_SINGLE_FROM_UCHAR32(), mrb_gc_register(), mrb_gc_unregister(), otfcc_parseGlyf(), otfcc_readOtl_common(), otfcc_SFNTBuilder_serialize(), otp_read(), otv_AlternateSubst_validate(), otv_Anchor_validate(), otv_Axis_validate(), otv_BASE_validate(), otv_BaseCoord_validate(), otv_BaseScript_validate(), otv_BaseScriptList_validate(), otv_BaseTagList_validate(), otv_BaseValues_validate(), otv_CaretValue_validate(), otv_ChainContextPos_validate(), otv_ChainContextSubst_validate(), otv_ClassDef_validate(), otv_ContextPos_validate(), otv_ContextSubst_validate(), otv_Coverage_get_count(), otv_Coverage_get_first(), otv_Coverage_get_last(), otv_Coverage_validate(), otv_CursivePos_validate(), otv_Device_validate(), otv_ExtensionPos_validate(), otv_ExtensionSubst_validate(), otv_Feature_validate(), otv_FeatureList_validate(), otv_GDEF_validate(), otv_GlyphAssembly_validate(), otv_GPOS_validate(), otv_GSUB_validate(), otv_GSUBGPOS_have_MarkAttachmentType_flag(), otv_JSTF_validate(), otv_JstfPriority_validate(), otv_JstfScript_validate(), otv_LangSys_validate(), otv_Ligature_validate(), otv_LigatureSubst_validate(), otv_Lookup_validate(), otv_LookupList_validate(), otv_MarkArray_validate(), otv_MarkBasePos_validate(), otv_MarkGlyphSets_validate(), otv_MarkLigPos_validate(), otv_MarkMarkPos_validate(), otv_MATH_validate(), otv_MathConstants_validate(), otv_MathGlyphConstruction_validate(), otv_MathGlyphInfo_validate(), otv_MathItalicsCorrectionInfo_validate(), otv_MathKern_validate(), otv_MathKernInfo_validate(), otv_MathVariants_validate(), otv_MinMax_validate(), otv_MultipleSubst_validate(), otv_O_x_Ox(), otv_PairPos_validate(), otv_PairSet_validate(), otv_ReverseChainSingleSubst_validate(), otv_Script_validate(), otv_ScriptList_validate(), otv_SinglePos_validate(), otv_SingleSubst_validate(), otv_u_C_x_Ox(), otv_u_O_O_O_O_x_Onx(), otv_u_O_O_u_O_O(), otv_u_O_O_x_Onx(), otv_u_x_Ox_y_Oy_z_Oz_p_sp(), otv_u_x_y_Ox_sy(), otv_ValueRecord_validate(), otv_x_Ox(), otv_x_sxy(), otv_x_ux(), otv_x_ux_y_uy_z_uz_p_sp(), otv_x_y_ux_sy(), parseGlyphOrder(), png_do_packswap(), Post_Create(), prepare_range_limit_table(), psh_blues_snap_stem(), psh_glyph_find_blue_points(), read_table(), woff2::ReadTrueTypeFont(), realParseTable(), OT::cmap::subset(), TabbingGetRow(), TabularGetRow(), translate_binhex(), tt_cmap_init(), tt_face_build_cmaps(), tt_face_goto_table(), tt_face_load_any(), tt_face_load_name(), TT_Get_Face_Widths(), tt_read_head_table(), tt_read_hhea_table(), tt_read_maxp_table(), tt_read_os2__table(), tt_read_vhea_table(), u2encoding_strncpy(), ucm_openTable(), ucm_separateMappings(), ucnv_DBCSFromUTF8(), ucnv_MBCSDoubleFromUnicodeWithOffsets(), ucnv_MBCSFromUChar32_68(), ucnv_MBCSFromUnicodeWithOffsets_68(), ucnv_MBCSGetFilteredUnicodeSetForUnicode_68(), ucnv_MBCSSingleFromBMPWithOffsets(), ucnv_MBCSSingleFromUnicodeWithOffsets(), ucnv_SBCSFromUTF8(), udata_swapPackage(), uloc_getTableStringWithFallback_68(), Utf8ToMacStr(), woff2_open_font(), woff_open_font(), write_std_cmap(), and writeStage3Roundtrip().

◆ tt_ligatures

struct ligatures tt_ligatures[]
Initial value:
= {
"exclam", "quoteleft", "exclamdown",
"question", "quoteleft", "questiondown",
}

Definition at line 437 of file aftopl.c.

Referenced by main().

◆ urx

◆ ury

◆ wx

◆ x_height