Page 1 of 1

[CMD] otfinfo - report information about OpenType fonts

Posted: 30 Nov 2013, 21:23
by tmplinshi

Re: [CMD] otfinfo - report information about OpenType fonts

Posted: 02 Dec 2013, 15:11
by joedf
nice! interesting :D

Re: [CMD] otfinfo - report information about OpenType fonts

Posted: 04 Dec 2013, 03:34
by TLM
This will come in handy as I often convert OTF to webfonts tyty

btw heres the converter: http://ahkscript.org/boards/viewtopic.php?f=22&t=874

Re: [CMD] otfinfo - report information about OpenType fonts

Posted: 13 Mar 2016, 07:55
by garry
a script to test how installed FONT's look like from user alguimist
https://autohotkey.com/boards/viewtopic.php?f=5&t=14838

see class customfont from user tmplinshi if want add a special FONT to your own script
https://autohotkey.com/boards/viewtopic.php?f=6&t=813

click column or use start-button

Code: Select all

;-------- saved at Sonntag, 13. März 2016 11:14:50 --------------
;-------- https://autohotkey.com/boards/viewtopic.php?f=5&t=14838 ---
;-------- from user = Alguimist

#NoEnv                        ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn
SendMode Input                ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1


Gui,3: default
Gui,3:Color, Black
Gui,3:Color, ControlColor, Black
Gui,3:Font,,FixedSys


   Menu,S1,add,Script_tmplinshi  ,MH1
   Menu,S1,add,Script_Source     ,MH1
   Menu,S1,add,Script_ZIP        ,MH1
   Menu,S1,add,Script_alguimist  ,MH1
   Menu,S1,add,Ahk_Font_Help     ,MH1
   Menu,S1,add,OTFINFO_HELP      ,MH1
   Menu,S1,add,OTFINFO_Download  ,MH1
   Menu,S1,add,SKAN              ,MH1
   Menu,S1,add,Latofonts         ,MH1
   Menu,S1,add,FontsOldSchool    ,MH1
   Menu,S1,add,Fontsquirrel      ,MH1


   Menu,S2,add,AHK_Version       ,MH2
   Menu,S3,add,WindowsFonts      ,MH3
   ;----------------------------
   menu,myMenuBar,Add,Font_Links    ,:S1
   menu,myMenuBar,Add,AHK_Version   ,:S2
   menu,myMenuBar,Add,WindowsFonts  ,:S3
   ;----------------------------
   gui,3:menu,MyMenuBar
   ;----------------------------


Gui,3: Add, ListView, x10 y10 w270 h360 sort gLV1 vLVA1 cYellow +hscroll altsubmit, Font name
LV_ModifyCol(1, 250)

gosub,functionx

Loop, % FontList.MaxIndex()
   LV_Add("", FontList[A_Index])

e4x:=""
loop,15
 e4x .= "This is a testline. This is Line- #@-" . a_index . "`r`n"

Gui,3:add,edit   ,x290  y10  h360 w470 vED1 hwndhText cTeal,%e4x%
Gui,3:add,edit   ,x290  y380 h25  w470 readonly cRed    vED2,Fixedsys
Gui,3:add,button ,x10   y380 h25  w80 gStart1 vSt1,Start
Gui,3:add,button ,x100  y380 h25  w80 gStop1 ,Stop
Gui,3:show ,x10 y10 h420 w800,WINDOWS-FONTS_TEST
Guicontrol,3:focus,st1
return
;---------------------------------------------------------------
3Guiclose:
exitapp
;---------------------------------------------------------------


LV1:
Gui,3:default
Gui,3:ListView,LVA1
Gui,3:submit,nohide

;RN:=LV_GetNext("C") ;2 selected checked
;RF:=LV_GetNext("F") ;2 selected focused
;GC:=LV_GetCount()   ;4 total

if A_GuiEvent = Normal
{
LV_GetText(C1,A_EventInfo,1)
;Gui,3: font, s14 cF16400 strike, %c1%           ;- change text-COLOR / SIZE / FONT
Gui,3: font, s12 cYellow normal , %c1%
Guicontrol,3: ,ED2,%c1%
Guicontrol,3: Font, ED1
Guicontrol,3: ,ED1,%ed1%                        ;- maybe CHANGE TEXT
}
return
;----------------------------------------


;----------------------------------------
start1:
breakloop=0
Gui,3:ListView,LVA1
i=0
loop,
{
if (breakloop=1)
   break

LV_Modify(I, "-Select -Focus")
i++
LV_Modify(I, "+Select +Focus")
RF:=LV_GetNext("F") ;2 selected focused
LV_GetText(C1,RF,1)
LV_Modify(RF, "Vis")    ;- scrolltox

Gui,3: font, s16 cF16400, %c1%                    ;- change text-COLOR / SIZE / FONT
Guicontrol,3: ,ED2,%c1%
Guicontrol,3: Font, ED1
Guicontrol,3: ,ED1,%ed1%                          ;- maybe CHANGE TEXT
sleep,1000
}
return
;-----------------------------

;----------------
stop1:
breakloop=1
return
;----------------

;--------------------------------------------------------------
mh1:


if A_thisMenuItem=Script_tmplinshi
   run,https://autohotkey.com/boards/viewtopic.php?f=6&t=813     ;- classcustomfont tmplinshi
if A_thisMenuItem=Script_Source
    run,https://gist.github.com/tmplinshi/7717340
if A_thisMenuItem=Script_ZIP
    run,https://www.dropbox.com/s/4h4e559tggvk1cq/Class_CustomFont_Samples.7z?raw=1
if A_thisMenuItem=Script_alguimist
    run,https://autohotkey.com/boards/viewtopic.php?f=5&t=14838
if A_thisMenuItem=Ahk_Font_Help
   run,https://autohotkey.com/docs/misc/FontsStandard.htm
if A_thisMenuItem=otfinfo_Help
   run,http://www.lcdf.org/type/otfinfo.1.html
if A_thisMenuItem=otfinfo_Download
   run,http://math.sut.ac.th/lab/software/texlive/bin/win32/otfinfo.exe
if A_thisMenuItem=SKAN
   run,https://autohotkey.com/board/topic/29396-crazy-scripting-include-and-use-truetype-font-from-script/
if A_thisMenuItem=Latofonts
   run,http://www.latofonts.com/lato-free-fonts/
if A_thisMenuItem=Fontsquirrel
   run,http://www.fontsquirrel.com/tools/webfont-generator
if A_thisMenuItem=FontsOldSchool
   run,http://int10h.org/oldschool-pc-fonts/

Guicontrol,3:focus,st1
return

mh2:
if A_thisMenuItem=AHK_version
  msgbox, 262208,AHK_Version ,Ahk-Version =%A_AHKVERSION%
Guicontrol,3:focus,st1
return

mh3:
ifexist,C:\windows\fonts
    run,C:\windows\fonts
Guicontrol,3:focus,st1
return
;--------------------------------------------------------------


;----------- from user alguimist ------------------------------
;-https://autohotkey.com/boards/viewtopic.php?f=5&t=14838
functionx:
Global FontList := []
EnumFonts() {
    hDC := DllCall("GetDC", "UInt", DllCall("GetDesktopWindow"))
    Callback := RegisterCallback("EnumFontsCallback", "F")
    DllCall("EnumFontFamilies", "UInt", hDC, "UInt", 0, "Ptr", Callback, "UInt", lParam := 0)
    DllCall("ReleaseDC", "UInt", hDC)
}

EnumFontsCallback(lpelf) {
    FontList.Push(StrGet(lpelf + 28, 32))
    Return True
}

EnumFonts()
aa:=FontList.MaxIndex()
return
;--------------------------------------------------------------
;==============================================================

Re: [CMD] otfinfo - report information about OpenType fonts

Posted: 14 Mar 2016, 09:25
by tidbit
I personally use
http://www.ampsoft.net/utilities/FontViewer.php
to view fonts.

free, lightweight, tons of options (sample text, color, background color, size, multiple viewing methods, can create groups/categories, etc).