// Text of project Monaco written on 11/21/95 at 8:10 PM // Beginning of text file monaco.f /* ** Newton Developer Technical Support Sample Code ** ** Monaco Font, A package with 9 pt monaco that prints as Courier ** ** by Bob Ebert, Newton Developer Technical Support ** ** Copyright © 1995 by Apple Computer, Inc. All rights reserved. ** ** You may incorporate this sample code into your applications without ** restriction. This sample code has been provided "AS IS" and the ** responsibility for its operation is 100% yours. You are not ** permitted to modify and redistribute the source as "DTS Sample Code." ** If you are going to re-distribute the source, we require that you ** make it clear in the source that the code was descended from ** Apple-provided sample code, but that you've made changes. */ // This sample shows how to take the output from another tool and turn it // into font packages for the Newton. The other tool is available on a limited // basis. Requests for the tool should be addressed to Apple Softwar Licensing, // via the AppleLink address SW.LICENSE. constant kUnicode := 0; constant kFix1 := 0x00010000; x := OpenResFileX(HOME & "Monaco 9 Plain"); gMonacoPlain := GetNamedResource("sfnt", "monaco", 'sfnt); CloseResFileX(x); x := OpenResFileX(HOME & "Courier Widths"); gCourierWidths := GetNamedResource("sfnt", "Courier Widths", 'sfnt); CloseResFileX(x); output := { Monaco: { name: "Monaco", encoding: kUnicode, macFontID: 4, // 4 is the FOND number of Macintosh Monaco -- other fonts should start at around 1027 screenSym: 'Monaco, psName: '|MonacoCourier:Newton|, psScale: (110 * kFix1) DIV 100, // scale up 10% plainData: gMonacoPlain, boldData: nil, italicData: nil, boldItalicData: nil, }, |MonacoCourier:Newton|: { name: "MonacoCourier:Newton", encoding: kUnicode, macFontID: 1027, // would be 22 if normal courier -- but just to be safe we avoid // duplicating a real 'courier substitution font ID for future compatibility // screenSym: '|MonacoCourier:Newton|, // NOT FOR "substitution" fonts! psSym: '|MonacoCourier:Newton|, psName: '|MonacoCourier:Newton|, // is this right? psScale: kFix1, // no scaling plainData: gCourierWidths, boldData: gCourierWidths, italicData: gCourierWidths, boldItalicData: gCourierWidths, // additional slots for PS printers normal: "Courier-Roman", bold: "Courier-Bold", italic: "Courier-Oblique", bolditalic: "Courier-BoldOblique" } }; // End of text file monaco.f