IDAutomation.com, Inc. |
Your Source for Quality Symbology |
This download package contains fonts for the Macintosh version of the Code 128 bar code fonts. These fonts allow printing of Code 128, UCC-128 and EAN-128 barcodes. Be aware that using Code 128 fonts on a Macintosh is a complicated process that is only recommended for advanced users and programmers. It is recommended that you use a Windows PC instead if it is possible.
Macintosh font files consist of resources stored in the resource fork of a file. Windows files contain only the data fork. To further complicate things, Macintosh files must also be given a file type and creator to allow them to show up on the desktop with the proper icons, and to tell the Macintosh operating system what type of files they are.
This TrueType version is formatted for the Macintosh computer in MacBinary format. This encodes both resource and data forks into one file so it can be encoded in a ZIP file. Using this file on a MAC is a two step process:
After the fonts are installed, the appropriate start, stop and check characters must be added to create a scanable barcode. Refer to the Code 128 Font Data Sheet for information on performing these calculations or writing an application to perform them for you. Note that on the Macintosh, the characters in the "char" column are different for ASCII 0195 to 0206 because the Macintosh uses different character encoding. To print these from a Macintosh, you will need to create an application that prints the characters from their UNICODE or ASCII locations.
Customers have successfully implemented our fonts on the Macintosh platform by using ATSUI. Our fonts contain the UNICODE 2.0 support and proper Apple name mappings that ATSUI requires. If problems are encountered with ATSUI, we recommend obtaining the AAT Font Tool from Apple's website. When converting our fonts with the AAT Font Tool, please be aware that the only option you should have selected is "Add a Unicode 2.0 'cmap' table".
The following is sample source code for character set C written for Omnis 4GL:
##### Method 'Code128c' ##### No. Parameter Type Subtype Init.Val/Calc 1 pvInNumber Number 0 dp No. Local Variable Type Subtype Init.Val/Calc 1 lvC128startVal Short integer (0 to 255) 105 2 lvC128stop Short integer (0 to 255) 206 3 lvCheckChar Character 10000000 4 lvCheckSum Long integer 5 lvInString Character 256 6 lvOutString Character 100 7 lvPairNo Short integer (0 to 255) 8 lvPairVal Short integer (0 to 255) 9 lvPosn Short integer (0 to 255) No. Method text 1 Calculate lvInString as pvInNumber 2 If not(isnumber(lvInString)) 3 OK message Code128c Translation (Sound bell) {Input parameter ([pvInNumber]) is not a number.} 4 Quit method '' 5 End If 6 If mod(len(lvInString),2)=1 7 Calculate lvInString as con('0',lvInString) 8 End If 9 10 Calculate lvCheckSum as lvC128startVal 11 Calculate lvPairNo as 0 12 13 For lvPosn from 1 to len(pvInNumber) step 2 14 Calculate lvPairNo as lvPairNo+1 15 Calculate lvPairVal as eval(mid(lvInString,lvPosn,2)) 16 Calculate lvCheckSum as lvCheckSum+(lvPairNo*lvPairVal) 17 If lvPairVal>0&lvPairVal<95 18 Calculate lvOutString as con(lvOutString,chr(lvPairVal+32)) 19 Else If lvPairVal>=95 20 Calculate lvOutString as con(lvOutString,chr(lvPairVal+100)) 21 Else If lvPairVal=0 22 Calculate lvOutString as con(lvOutString,chr(194)) 23 End If 24 End For 25 26 Calculate lvCheckSum as mod(lvCheckSum,103) 27 If lvCheckSum>0&lvCheckSum<95 28 Calculate lvCheckChar as chr(lvCheckSum+32) 29 Else If lvCheckSum>=95 30 Calculate lvCheckChar as chr(lvCheckSum+100) 31 Else If lvCheckSum=0 32 Calculate lvCheckChar as chr(194) 33 End If 34 35 Calculate lvOutString as con(chr(lvC128startVal+100),lvOutString,lvCheckChar,chr(lvC128stop)) 36 Quit method lvOutString
NOTE: The code example above is only sample code. We cannot provide consulting services to help you with your source code; we can only support the font itself.
Copyright © 1999-2001 IDAutomation.com, Inc. All trademarks are the property of their respective owners.
|