From 79aa922282edd795d55bf06cf622ddf33884dff5 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Sep 2003 19:41:13 +0000 Subject: Initial Import --- TtfInfo Client/FontInfo.frm | 321 ++++++++++++++++++++++++++++++++++++++++++++ TtfInfo Client/FontInfo.vbp | 37 +++++ TtfInfo Client/FontInfo.vbw | 2 + TtfInfo Client/FontView.frm | 78 +++++++++++ TtfInfo Client/FontView.frx | Bin 0 -> 201 bytes 5 files changed, 438 insertions(+) create mode 100644 TtfInfo Client/FontInfo.frm create mode 100644 TtfInfo Client/FontInfo.vbp create mode 100644 TtfInfo Client/FontInfo.vbw create mode 100644 TtfInfo Client/FontView.frm create mode 100644 TtfInfo Client/FontView.frx (limited to 'TtfInfo Client') diff --git a/TtfInfo Client/FontInfo.frm b/TtfInfo Client/FontInfo.frm new file mode 100644 index 0000000..5a788f8 --- /dev/null +++ b/TtfInfo Client/FontInfo.frm @@ -0,0 +1,321 @@ +VERSION 5.00 +Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX" +Begin VB.Form frmFontInfo + BorderStyle = 1 'Fixed Single + Caption = "FontInfo" + ClientHeight = 5490 + ClientLeft = 45 + ClientTop = 330 + ClientWidth = 7620 + LinkTopic = "Form1" + MaxButton = 0 'False + ScaleHeight = 5490 + ScaleWidth = 7620 + StartUpPosition = 3 'Windows Default + Begin VB.CommandButton cmdView + Caption = "View..." + Height = 375 + Left = 6240 + TabIndex = 11 + Top = 720 + Width = 1215 + End + Begin VB.CommandButton cmdUninstall + Caption = "Uninstall" + Height = 375 + Left = 6240 + TabIndex = 10 + Top = 1920 + Width = 1215 + End + Begin VB.CommandButton cmdInstall + Caption = "Install" + Height = 375 + Left = 6240 + TabIndex = 9 + Top = 1320 + Width = 1215 + End + Begin MSComDlg.CommonDialog cdlFont + Left = 6960 + Top = 2520 + _ExtentX = 847 + _ExtentY = 847 + _Version = 327680 + CancelError = -1 'True + DefaultExt = "*.ttf" + DialogTitle = "Choose A Font" + Filter = "TrueType Fonts (*.ttf) | *.ttf" + InitDir = "C:\" + End + Begin VB.CommandButton cmdSelect + Caption = "Select..." + Height = 375 + Left = 6240 + TabIndex = 0 + Top = 120 + Width = 1215 + End + Begin VB.Label Label8 + AutoSize = -1 'True + Caption = "Copyright:" + Height = 195 + Left = 240 + TabIndex = 19 + Top = 4440 + Width = 705 + End + Begin VB.Label Label7 + AutoSize = -1 'True + Caption = "Version:" + Height = 195 + Left = 240 + TabIndex = 18 + Top = 600 + Width = 570 + End + Begin VB.Label Label6 + AutoSize = -1 'True + Caption = "Trademark:" + Height = 195 + Left = 240 + TabIndex = 17 + Top = 3600 + Width = 810 + End + Begin VB.Label Label5 + AutoSize = -1 'True + Caption = "Postscript Name:" + Height = 195 + Left = 240 + TabIndex = 16 + Top = 3120 + Width = 1200 + End + Begin VB.Label Label4 + AutoSize = -1 'True + Caption = "ID:" + Height = 195 + Left = 240 + TabIndex = 15 + Top = 2640 + Width = 210 + End + Begin VB.Label Label3 + AutoSize = -1 'True + Caption = "Subfamily:" + Height = 195 + Left = 240 + TabIndex = 14 + Top = 2160 + Width = 720 + End + Begin VB.Label Label2 + AutoSize = -1 'True + Caption = "Family:" + Height = 195 + Left = 240 + TabIndex = 13 + Top = 1680 + Width = 480 + End + Begin VB.Label Label1 + AutoSize = -1 'True + Caption = "Name:" + Height = 195 + Left = 240 + TabIndex = 12 + Top = 120 + Width = 465 + End + Begin VB.Label lblVersion + BackColor = &H80000005& + Caption = "lblVersion" + ForeColor = &H80000008& + Height = 915 + Left = 1560 + TabIndex = 8 + Top = 600 + Width = 4455 + End + Begin VB.Label lblTrademark + BackColor = &H80000005& + Caption = "lblTrademark" + ForeColor = &H80000008& + Height = 615 + Left = 1560 + TabIndex = 7 + Top = 3600 + Width = 4455 + End + Begin VB.Label lblSubfamily + BackColor = &H80000005& + Caption = "lblSubfamily" + ForeColor = &H80000008& + Height = 255 + Left = 1560 + TabIndex = 6 + Top = 2160 + Width = 4455 + End + Begin VB.Label lblPostscriptName + BackColor = &H80000005& + Caption = "lblPostscriptName" + ForeColor = &H80000008& + Height = 255 + Left = 1560 + TabIndex = 5 + Top = 3120 + Width = 4455 + End + Begin VB.Label lblName + BackColor = &H80000005& + Caption = "lblName" + ForeColor = &H80000008& + Height = 255 + Left = 1560 + TabIndex = 4 + Top = 120 + Width = 4455 + End + Begin VB.Label lblID + BackColor = &H80000005& + Caption = "lblID" + ForeColor = &H80000008& + Height = 255 + Left = 1560 + TabIndex = 3 + Top = 2640 + Width = 4455 + End + Begin VB.Label lblFamily + BackColor = &H80000005& + Caption = "lblFamily" + ForeColor = &H80000008& + Height = 255 + Left = 1560 + TabIndex = 2 + Top = 1680 + Width = 4455 + End + Begin VB.Label lblCopyright + BackColor = &H80000005& + Caption = "lblCopyright" + ForeColor = &H80000008& + Height = 915 + Left = 1560 + TabIndex = 1 + Top = 4440 + Width = 4455 + End +End +Attribute VB_Name = "frmFontInfo" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Option Explicit +Private f As TtfInfoLib.FontInfo + +Private Sub cmdInstall_Click() + On Error GoTo err_Unexpected + + If f = "" Then + MsgBox "Pick a font first" + Exit Sub + End If + + If f.RegisteredFileName <> "" Then + MsgBox "A font with this name is already installed" & _ + vbCrLf & f.RegisteredFileName + Exit Sub + End If + + f.Install True + Exit Sub + +err_Unexpected: + MsgBox Err.Description +End Sub + +Private Sub cmdSelect_Click() + On Error GoTo err_Cancel + cdlFont.ShowOpen + + On Error GoTo err_Create + Set f = New TtfInfoLib.FontInfo + + On Error GoTo err_FileName + ' FileName is the default property + f = cdlFont.filename + + On Error GoTo err_Unexpected + With f + Caption = "FontInfo - " & .filename + + lblCopyright = .Copyright + lblFamily = .Family + lblID = .ID + lblName = .Name + lblPostscriptName = .PostscriptName + lblSubfamily = .Subfamily + lblTrademark = .Trademark + lblVersion = .Version + End With + + Exit Sub + + +err_Create: +err_FileName: +err_Unexpected: + MsgBox Err.Description +err_Cancel: + Exit Sub +End Sub + +Private Sub cmdUninstall_Click() + On Error GoTo err_Unexpected + + If f.RegisteredFileName = "" Then + MsgBox "This font is not installed" + Exit Sub + End If + + If f.RegisteredFileName <> f.filename Then + MsgBox "The font that you have picked is installed, but a different file has been registered" _ + & vbCrLf & f.RegisteredFileName + Exit Sub + End If + + f.Uninstall True + Exit Sub + +err_Unexpected: + MsgBox Err.Description +End Sub + +Private Sub cmdView_Click() + On Error GoTo err_Unexpected + + Dim frm As New frmFontView + With frm + Set .DisplayFont = f + .Show + End With + Exit Sub + +err_Unexpected: + MsgBox Err.Description +End Sub + +Private Sub Form_Load() + On Error GoTo err_Unexpected + + Set f = New TtfInfoLib.FontInfo + cdlFont.InitDir = f.GetFontsDirectory() + Exit Sub + +err_Unexpected: + MsgBox Err.Description +End Sub diff --git a/TtfInfo Client/FontInfo.vbp b/TtfInfo Client/FontInfo.vbp new file mode 100644 index 0000000..d7f6fb2 --- /dev/null +++ b/TtfInfo Client/FontInfo.vbp @@ -0,0 +1,37 @@ +Type=Exe +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\System32\STDOLE2.TLB#OLE Automation +Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0; COMDLG32.OCX +Reference=*\G{F6CC4910-26B2-11D1-ACED-204C4F4F5020}#1.0#0#\\GONZO\Desktop\TTF\TtfInfo\Debug\TtfInfo.dll#TtfInfo 1.0 Type Library +Form=FontInfo.frm +Form=FontView.frm +Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0; RICHTX32.OCX +IconForm="frmFontInfo" +Startup="frmFontInfo" +HelpFile="" +Title="FontInfo" +ExeName32="FontInfo.exe" +Path32="..\..\..\..\..\Administrator\Desktop\TTF\TtfInfo\VBClient" +Command32="" +Name="FontInfo" +HelpContextID="0" +CompatibleMode="0" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +VersionCompanyName="Gonzo ESM" +CompilationType=0 +OptimizationType=0 +FavorPentiumPro(tm)=-1 +CodeViewDebugInfo=-1 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=0 +Unattended=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 diff --git a/TtfInfo Client/FontInfo.vbw b/TtfInfo Client/FontInfo.vbw new file mode 100644 index 0000000..fe614c7 --- /dev/null +++ b/TtfInfo Client/FontInfo.vbw @@ -0,0 +1,2 @@ +frmFontInfo = 160, 185, 685, 625, C, 17, 12, 551, 626, C +frmFontView = 88, 88, 613, 528, , 44, 44, 569, 484, diff --git a/TtfInfo Client/FontView.frm b/TtfInfo Client/FontView.frm new file mode 100644 index 0000000..f62c912 --- /dev/null +++ b/TtfInfo Client/FontView.frm @@ -0,0 +1,78 @@ +VERSION 5.00 +Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX" +Begin VB.Form frmFontView + BorderStyle = 1 'Fixed Single + Caption = "FontView" + ClientHeight = 4410 + ClientLeft = 45 + ClientTop = 330 + ClientWidth = 7500 + LinkTopic = "Form1" + MaxButton = 0 'False + ScaleHeight = 4410 + ScaleWidth = 7500 + StartUpPosition = 3 'Windows Default + Begin RichTextLib.RichTextBox rtbFontView + Height = 4095 + Left = 120 + TabIndex = 0 + Top = 120 + Width = 7215 + _ExtentX = 12726 + _ExtentY = 7223 + _Version = 327680 + ReadOnly = -1 'True + OLEDragMode = 0 + OLEDropMode = 0 + TextRTF = $"FontView.frx":0000 + End +End +Attribute VB_Name = "frmFontView" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Option Explicit +Public DisplayFont As TtfInfoLib.FontInfo + +Private Sub Form_Load() +On Error GoTo err_Unexpected + ' Temporarily install the font + DisplayFont.Install False + Caption = "FontView - " & DisplayFont.filename + + With rtbFontView + .Text = "" + + .SelFontName = "Times" + .SelFontSize = 20 + .SelText = DisplayFont.Name & vbCrLf + + .SelFontSize = 10 + .SelText = "Version: " & DisplayFont.Version & vbCrLf + + .SelFontName = DisplayFont.Name + .SelFontSize = 24 + .SelText = "abcdefghijklmnopqrstuvwxyz" & vbCrLf + .SelText = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & vbCrLf + .SelText = "1234567890 !'£$%^&*();':.," + + .SelStart = 0 + End With + Exit Sub + +err_Unexpected: + MsgBox Err.Description +End Sub + +Private Sub Form_Unload(Cancel As Integer) +On Error GoTo err_Unexpected + ' Uninstall the font + ' (This has no effect if the font is permanently installed) + DisplayFont.Uninstall False + Exit Sub + +err_Unexpected: + MsgBox Err.Description +End Sub + diff --git a/TtfInfo Client/FontView.frx b/TtfInfo Client/FontView.frx new file mode 100644 index 0000000..523de71 Binary files /dev/null and b/TtfInfo Client/FontView.frx differ -- cgit v1.2.3