1map entry:cyberb @ Unicode @ <cyberbit.ttf PidEid = 3, 1 means cyberb < INFIX > = >look at Unicode.sfd = >find the mapping = >charcode = >PidEid = 3, 1 = >glyphs eg cyberb01 = >subfont 01 in Unicode.sfd = >charcodes Infix can be anything, thus the question:given a tfm name, how to find out 2 whether this is a subfont ? 3 It is safe to limit the infix to be composed from hexadecimal digits only ? 4 If so, one possibility is : (1) 5 while last 6 -char -of - tfmname is a hexdigit 7 do 8 remove the last char from tfmname 9 do 10 a lookup for the tfmname 11 if found an entry with subfont flag then break enddo(2) 12 Or, when a map entry with subfont flag is scanned, 13 let pdftex create all the relevant entries. 14 Which may be a safer and faster solution(but wastes more memory) 15 16 17 Let 's do (2), as infix can be any word. 18 19 20 21Implementation: 22 23- let' s have a map entry : cyberb @ Unicode @ <cyberbit.ttf PidEid = 3, 1 - actions: 24 -read Unicode.sfd 25 - create corresponding sfd mapping like("01", "Unicode") = 26 >long[256] 27 - added those subfont to an AVL tree - 28 create map entries for cyberb01-- cyberbff, 29 each has a pointer to the corresponding sfd mapping entry - 30 extended attributes for map entry:-Pid - Eid - sfd_map - 31 sfd_mapping:-name:sfd name, eg "Unicode" - infix, 32 eg "01" - mapping:long[256] 33 34-how to find out whether a sfd has been loaded: 35 -lookup for any entry with the given sfd 36 name - functions:-load_sfd - 37 lookup_subfont - 38 extend reading map entries - 39 when writting ttf:-if re - encoded-- > 40 process like in case of type1 fonts - 41 if PidEid is being used:-read cmap 42 tables:store(ttfname, pid, eid) 43 -search for used chars - use sfd to find the charcodes - look into cmap to 44