Uploading font metrics using Load AFM File function

Summary

The SAP system is delivered with the font metrics data that is required for all standard SAPscript forms. Sometimes we want to use a typeface that is not included in the SAP standards; in that case we need to upload font metrics data. There are two ways to upload font metrics.  Here am describing the step by step procedure to upload the font metrics using the method Load AFM File function.

Author: Abyson Joseph Chavara          

Company: Applexus Technologies (P) LTD       

Created on:  27 August 2013

   
 

Table of Contents

Introduction.

Methods for uploading font metrics.

Step by step procedure to upload the font metrics using Load AFM File function.
      Step 1: Copy the *.afm file(s)

      Step 2:  Create a font family.

      Step 3: Load AFM File.

      Step 4:  Setting Attributes.

      Step 5:  Generate font

      Step 6:  Repeat the upload procedure.

      Step 7:  Specify the print controls.

Copyright

Introduction

The SAP system is delivered with the font metrics data that is required for all standard SAPscript forms. If in some cases we want to use a typeface that is not included in the SAP standard or we need to create our own form and printing program to use your special typeface. In that cases we need to upload font metrics data. Uploading font metrics makes them available to SAPscript for filling text during output.

Methods for uploading font metrics

There are two ways to upload font metrics.  We can choose the method, depending on the type of font metrics information available with us.

Method 1: Load AFM File function

We can use this SAPscript Load AFM File function to upload the font metrics, if we have an .afm font metrics files in Adobe Font Metrics ASCII format.

Method 2: SAPLPD/RSTXLMET method

   We could use the SAPLPD/RSTXLMET method for uploading font metrics for any font that is installed in Microsoft Windows.

Here I am describing the steps in uploading font metrics using the method Load AFM File function.

Step by step procedure to upload the font metrics using Load AFM File function

To upload font metrics we need an .afm font metrics files in Adobe Font Metrics ASCII format.

Step1: Copy the *.afm file(s)

Copy the *.afm file(s) (ASCII format) to a directory that is accessible from the frontend computer you are working on.

Step2: Create a font family

Create a SAPscript font family for the font, if one does not already exist. Choose Administration >>CCMS >>Print >>Font Maintenance or run transaction SE73 and then Font Families and Change. Choose Create to add a new font family. You can use any name you want for the font family. Leave Substitute family fields blank unless there is an alternative SAP font family to this one. The substitute family is used in the event that this font is not defined in the target device type of an output request. For Character set, enter the number of the character set to use for printing this font. For example: enter 1705 for a printer that outputs Greek characters (see the screen shot below).

Step 3: Load AFM File

Return to the initial font maintenance screen. Choose Printer fonts and Change. Position the cursor on the device type (printer) for which the font metrics are intended. Here I have selected the device type ‘ZCHE_09’ which I have created before in SPAD. Choose Load AFM File, enter the path name of the .afm file in the upload dialog window, and choose Transfer to upload the file. The system asks you to create a transport request.Use this request to transport the new font to other SAP systems.

Step 4:  Setting Attributes

Fill out the fields in the dialog box displayed. Select the attributes (bold and italic) appropriate for the file you uploaded. For the font size, enter 000 if the font is to be used with the POST, SWIN, or HPL2 OTF drivers. 000 means that this font is scalable and these printers are all capable of using the AFM data to scale the font to any required size. For devices that use other OTF drivers (STN2 and so on), upload the AFM files separately for each font size that you need. For this, specify the actual font size. Finally, enter a unique name(s) for the print controls to be used to switch to this font in portrait and landscape mode. The names must have the format SF<xxx> and must be unique among the print controls for the current device type.

Click on the device type and press F2 to open the list of printer fonts. The new font that you have uploaded should appear in the list as shown below.

Step 5:  Generate font

Generate the font by choosing Edit >> Generate font.

If the system displays the message PostScript character xxxx is unknown, this means that the uploaded information included a character that SAP could not identify. Either delete this character from the uploaded font or substitute the character name that SAP uses for the character. 

Try to find the character among the characters supported by SAP. To display the SAP character definitions, create a new SAP session and run transaction SPAD. Then choose Full administration and SAP Characters (Screen shot shown below). Enter the character name xxxx (replace with name shown in the message) in the sap characters field and click display.

If you find an equivalent SAP character, then choose Edit metrics (red circled in the screen shot below) in the Change printer fonts screen.

The edit fontmetrics screen will be displayed as below. Replace the unknown original name of the character with the R/3 name. This makes the character printable from R/3.

If you do not find an equivalent character, then you must delete the unknown character from the uploaded font metrics. The character will not be printable from R/3. Choose Edit metrics from the Change printer fonts screen. Then delete the line that defines the character. Also reduce the number of characters that appears at the start of the AFM file.

Repeat this step until all unknown characters have been handled and the font has been successfully generated.

Step 6: Repeat the upload procedure

Repeat the upload procedure until you have added all of your *.afm files. You only need to create the font family once.

Step 7: Specify the print controls

Specify the print controls for switching to this font in portrait and landscape mode by choosing the Maint. Print control (red circled in the below screen shot).

Your font is now ready for use.

Thanks an Regards,

Abyson Joseph Chavara.

Copyright

© Copyright 2011 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (“SAP Group”) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

To report this post you need to login first.

13 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply