Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCF/ATS/ATS fontnames list 2
Function:
Required plugins for this example: MBS MacCF Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCF/ATS/ATS fontnames list 2
This example is the version from Sun, 17th Mar 2012.
Project "ATS fontnames list 2.rbp"
Class Window1 Inherits Window
Control ListBox1 Inherits Listbox
ControlInstance ListBox1 Inherits Listbox
EventHandler Sub ExpandRow(row As Integer) dim i,j,c as integer dim f as ATSFontNameMBS dim s,d as string dim t as TextConverter const kFontCopyrightName = 0 const kFontFamilyName = 1 const kFontStyleName = 2 const kFontUniqueName = 3 const kFontFullName = 4 const kFontVersionName = 5 const kFontPostscriptName = 6 const kFontTrademarkName = 7 const kFontManufacturerName = 8 const kFontDesignerName = 9 const kFontDescriptionName = 10 const kFontVendorURLName = 11 const kFontDesignerURLName = 12 const kFontLicenseDescriptionName = 13 const kFontLicenseInfoURLName = 14 const kFontUnicodePlatform = 0 const kFontMacintoshPlatform = 1 const kFontReservedPlatform = 2 const kFontMicrosoftPlatform = 3 const kFontCustomPlatform = 4 i=val(me.Cell(row,3)) c=val(me.Cell(row,1))-1 for j=0 to c me.AddRow "#"+str(j) f=a.FontName(i,j) if f<>nil then s=f.Name Select case f.NameCode case kFontCopyrightName d="Copyright" case kFontFamilyName d="Family" case kFontStyleName d="Style" case kFontUniqueName d="Unique Name" case kFontFullName d="Full Name" case kFontVersionName d="Version" case kFontPostscriptName d="Postscript" case kFontTrademarkName d="Trademark" case kFontManufacturerName d="Manufacturer" case kFontDesignerName d="Designer" case kFontDescriptionName d="Description" case kFontVendorURLName d="Vendor URL" case kFontDesignerURLName d="Designer URL" case kFontLicenseDescriptionName d="License Description" case kFontLicenseInfoURLName d="License Info URL" else d="" end Select me.Cell(me.LastIndex,1)=d me.Cell(me.LastIndex,2)=s end if next End EventHandler
End Control
EventHandler Sub Open() dim i,c as integer dim cc as integer dim f as ATSFontNameMBS a=new ATSFontListMBS c=a.Count for i=0 to c-1 ListBox1.AddFolder str(a.FontID(i)) cc=a.FontNameCount(i) ListBox1.Cell(ListBox1.LastIndex,1)=str(cc) // strange number!? f=a.FontName(i,1) ListBox1.Cell(ListBox1.LastIndex,3)=str(i) if f<>Nil then ListBox1.Cell(ListBox1.LastIndex,2)=f.Name end if next End EventHandler
Property Protected a As ATSFontListMBS
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

See also:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacCF Plugin.




Links
MBS Xojo Plugins