Code39Wide

授权类型:商用须授权

字体预览

输入预览文字,10字以内,可设置颜色、大小、简繁。回车查看效果
预览图加载中

字体参数

字体名称
Code39Wide
PostScript名称
Code39Wide
字体族名
Code39Wide
字体风格
Regular
字符数
51
文件大小
0.03MB
支持语言
英语
版本
4.0
格式
ttf
描述信息
Code 39 Sample Code This sample code can be incorporated into your application as long as the copyright notice is left intact. Redistribution of Azalea Software's fonts requires a separate licensing fee.Error checking for the correct Code 39 character set is your application’s responsibility:Dim i as IntegerDim yourString as StringDim chunk as stringFor i = 1 To Len(yourString) Step 1' C39Tools v4.0 4.14.99 yazel' Copyright 1999 Jerry Whiting. All rights reserved.' Azalea Software, Inc. www.azalea.comchunk$ = Mid(yourString, i, 1) If InStr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%", chunk) = 0 Then ' error handling Exit Sub End IfNext iTo do the standard 44 character version of Code 39:Function AzaleaCode39(ByVal C39 as String) as String' C39Tools v4.0 4.14.99 yazel' Copyright 1999 Jerry Whiting. All rights reserved.' Azalea Software, Inc. www.azalea.com ' The input, C39, is a string consisting of the 44-character version ' of Code 39 without the start and stop bars (*). ' Format the output, AzaleaCode39, using Azalea's Code 39 fonts. Dim i As Integer ' loop counter Dim chunk As String ' loop variable Dim temp As String ' temp variable ' Because TrueType doesn't support glyphs in the space slot (ASCII 32) ' we've moved the space character to the underscore ( _ ). ' Here's the search and replace. For i = 1 To Len(C39) chunk$ = Mid$(C39, i, 1) If chunk = " " Then temp = temp + "_" Else temp = temp + chunk End If Next i ' put together the final string with the start and stop bars AzaleaCode39 = "*" + temp + "*" ' Format the output, AzaleaCode39, using Azalea Software's Code 39 font. ' yourContainer.text = AzaleaCode39(yourString)End FunctionTo do the Full ASCII version of Code 39:Function AzaleaCode39ASCII(ByVal C39 as String) as String' C39Tools v4.0 4.14.99 yazel' Copyright 1999 Jerry Whiting. All rights reserved.' Azalea Software, Inc. www.azalea.com ' The input, C39, gets mapped into the Full ASCII version of Code 39. ' Format the output, AzaleaCode39, using Azalea's Code 39 fonts. Dim i As Integer ' loop counter Dim chunk As String ' loop variable Dim temp As String ' temp variable' map into the Full ASCII version of Code 39 For i = 1 To Len(C39) chunk = Mid(C39, i, 1) Select Case Asc(chunk) Case 0 temp = temp + “%U” Case 1 To 26 temp = temp + “$” + Chr(Asc(chunk) + 64) Case 27 To 31 temp = temp + “%” + Chr(Asc(chunk) + 38) Case 32 ' Because TrueType doesn't support glyphs in the space slot (ASCII 32) ' we've moved the space character to the underscore ( _ ). ' Here's the search and replace. temp = temp + “_” Case 33 To 44 temp = temp + “/” + Chr(Asc(chunk) + 32) Case 45 To 46 temp = temp + chunk Case 47 temp = temp + “/O” Case 48 To 57 temp = temp + chunk Case 58 temp = temp + “/Z” Case 59 To 63 temp = temp + “%” + Chr(Asc(chunk) + 11) Case 64 temp = temp + “%V” Case 65 To 90 temp = temp + chunk Case 91 To 95 temp = temp + “%” + Chr(Asc(chunk) - 16) Case 96 temp = temp + “%W” Case 97 To 122 temp = temp + “+” + Chr(Asc(chunk) - 32) Case 123 To 126 temp = temp + “%” + Chr(Asc(chunk) - 43) Case 127 temp = temp + “%T” End Select Next i ' put together the final string with the start and stop bars AzaleaCode39ASCII = “*” + temp + “*” ' yourContainer.text = AzaleaCode39(yourString)End FunctionCode 39 is sometimes used with an optional mod 43 check digit.Function AzaleaCode39checkDigit (ByVal C39 as String) as String' C39Tools v4.0 2.18.98 jwhiting' Copyright 1998 Jerry Whiting. All rights reserved.' Azalea Software, Inc. www.azalea.com ' The input, C39, is a string consisting of the 44-character version ' of Code 39 whithout the start and stop bars (*). ' The output, AzaleaCode39checkDigit, is the input string, the mod 43 ' check digit and the start and stop bars. Dim charSet As String ' mod 43 lookup table Dim i As Integer ' loop counter Dim subtotal As Integer ' check digit subtotal charSet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%" For i = 1 To Len(C39) subtotal = InStr(charSet, Mid(C39, i, 1)) - 1 + subtotal Next i ' concatenate the original string, C39, and the check digit character AzaleaCode39checkDigit = C39$ & Mid$(charSet, (subtotal Mod 43 + 1), 1)End Function
作者信息
Jerry Whiting-http://www.azalea.com
版权
Copyright 1999 Jerry Whiting