Skip to content

Instantly share code, notes, and snippets.

@jwodder
Created May 11, 2014 23:53
Show Gist options
  • Save jwodder/65591f22496dc042b469 to your computer and use it in GitHub Desktop.
Save jwodder/65591f22496dc042b469 to your computer and use it in GitHub Desktop.
Make a font use ISOLatin1Encoding
% This procedure takes a Font resource and creates a new font from it that uses
% the ISOLatin1Encoding encoding vector. It is based on code given in the PLRM.
% Stack effect: font name-of-new-font -- new-font
% Example usage:
% /Helvetica findfont /Helvetica-Latin1 mkLatin1 12 scalefont setfont
/mkLatin1 {
exch dup length dict begin
{ 1 index /FID ne { def } { pop pop } ifelse } forall
/Encoding ISOLatin1Encoding def
currentdict end definefont
} def
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment