Author Topic: font file mapping  (Read 4669 times)

LWagner

  • Guest
font file mapping
« on: August 25, 2010, 08:54:34 PM »
      We have AFP letter files, which use 13 different fonts counting point size and leading size combinations.  The vendor only provided 5 font files.  I have a nasty feeling I still need 8 more font files from them in order to not have to map to default fonts and change the look from the design documents.  Or can multiple fonts in point and leading size combinations come from one font file ?

      Its very difficult to find accurate and detailed font mapping information.  I have seen the famous Chapter 19.

Thank you

LWagner

  • Guest
Re: font file mapping
« Reply #1 on: September 24, 2010, 08:13:29 AM »
Found my answer, and feel much more confident in working with AFP and font mapping.

With AFP, there will always be an error message in opening or navigating a document for any undefined font code not in csdef.fnt.  ALso, if a new code page is used, then that needs to be added to cpdef.fnt. The vendor finally gave in and provided the right font files for us, so we were not mapping "almost right" fonts.  Another issue in the display was that they were doing character by character positioning, rather than positioning full lines of text, so kerning and leading between letters was omitted causing partial letter overlay and crowding.

Its been educational.

Our next AFP project has 38 pages of document specifications with 44 different font style/size combinations.  At least we get to start with the font files in place, but need all new font codes to not impact prior AFP projects.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2231
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: font file mapping
« Reply #2 on: September 24, 2010, 02:54:19 PM »
Maybe you could be coerced / convinced to create a document or series of slides talking about this?  In my 15 years of working with CMOD, I've never had more than a fleeting understanding of AFP Font Mapping, and I know I'm not alone!
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

LWagner

  • Guest
Re: font file mapping
« Reply #3 on: October 26, 2010, 11:59:54 AM »
The slides I have were confusing.

AFP font changes need to be on EACH PC displaying the AFP document.  If using Webi, only the Webi server. But we found Webi not ready for prime time unless you have a very high memory, very fast PC for the users.

If new fonts are needed not found on the PCs, those actual font files go in dicretory C:/WINDOWS/Fonts on each PC to display them.

Custom font codes can be embedded in the AFP.  Those then are added the csdef.fnt file in OnDemand/FONT.  The custom font code values are then assigned to font fgid numbers, with height and width parameters. For example:
;charset = fgid,height,width,strikeover,underline
C0EX01A0=3900,80,0,0,0
is in the top of the csdef.fnt file identifying a character set and custom font code in the [CHARSET] section.
C0EX01A0 would be the actual font code embedded in the AFP file
3900 maps to a font fgid later in the file.
The 80, is a value of 1/10th of a point for point size. So this font code specifies an 8 point font.

3900=Swis721 BlkCn BT,SWISS,MED,0
;fgid = familyname,style,weight,italic
appears farther down in the [FGID] section of csdef.fnt, mapping a font code to font information in WINDOWS/Fonts folder

note the 3900 in both.  That is an fgid connection, where when C0EX01A0 is found in the AFP file, use the Swis721 BlkCn BT font.

Every new font size and style requires a CHARSET entry. Thus for our new bills, there are up to 5 or 6 point sizes with about 17 different font styles, for 44 required CHARSET entries I will require. I went through the spec documents and counted each combination of style and point size.

Custom code pages can also be used, then that invloves the cpdef.fnt file.