FontViewer
juten abend wollte euch mal meine anwendung vorstellen
beschreibung:mit dem font viewer könnt ihr alle symbole eurer installierten schriften anzeigen.
ihr könnt dabei die schriftfarbe,schriftgröße und schrifteigenschaften (fett,kursiv) ändern.
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <EditConstants.au3>
$Left = 10
$Top = 10
$Zaehler = 0
Dim $Label[191][4]
$Zaehler2 = 0
Dim $FontLabel[1000][2]
$Form = GUICreate("FontViewer", 1000, 550, -1, -1)
GUISetBkColor(0x505050)
GUICtrlSetDefColor(0xc1c1c1)
$RegReadAll = ""
$RegIndex = 0
$FontName = "Arial"
$FontType1 = 400
$FontType2 = 0
$FontSize = 8
$FontColor = 0xc1c1c1
Do
$RegIndex = $RegIndex + 1
$RegRead = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", $RegIndex)
$RegError = @error
$RegRead = StringReplace($RegRead, "(TrueType)", "")
$RegRead = StringReplace($RegRead, "(Alle Auflösungen)", "")
$RegRead = StringReplace($RegRead, "(VGA-Auflösung)", "")
$RegRead = StringReplace($RegRead, "(OpenType)", "")
$StringLen = StringLen($RegRead)
$RegRead = StringLeft($RegRead, $StringLen - 1)
If Not $RegError Then $RegReadAll &= $RegRead & "|"
Until $RegError <> 0
$InputFontName = GUICtrlCreateCombo("Arial", 815, 32, 170, 28)
GUICtrlSetData(-1, $RegReadAll)
GUICtrlSetBkColor(-1, 0x414141)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$InputFontSize = GUICtrlCreateCombo("8", 815, 144, 170, 28)
GUICtrlSetData(-1, "10|12|14|16|18|20|22")
GUICtrlSetBkColor(-1, 0x414141)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlCreateLabel("Schriftname:", 815, 8, 94, 24)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
GUICtrlCreateLabel("Schriftgröße:", 815, 120, 96, 24)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
$InputFontType = GUICtrlCreateCombo("Standard", 815, 88, 170, 28)
GUICtrlSetData(-1, "Kursiv|Fett|Fett Kursiv")
GUICtrlSetBkColor(-1, 0x414141)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlCreateLabel("Schriftstil:", 815, 64, 69, 24)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
GUICtrlCreateLabel("Schriftfarbe:", 815, 176, 91, 24)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
$InputFontColor = GUICtrlCreateCombo("Standard", 815, 200, 170, 28)
GUICtrlSetData(-1, "Schwarz|Weiß|Rot|Gelb|Grün|Blau|Dunkelrot|Dunkelgelb|Dunkelgrün|Dunkelblau|Andere Farbe")
GUICtrlSetBkColor(-1, 0x414141)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Beispiel = GUICtrlCreateInput("Beispiel", 815, 264, 170, 50, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_READONLY))
GUICtrlSetBkColor(-1, 0x414141)
GUICtrlSetFont(-1, $FontSize, $FontType1, $FontType2, $FontName)
GUICtrlSetColor(-1, $FontColor)
GUICtrlCreateLabel("Beispiel:", 815, 240, 63, 24)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
$Up = GUICtrlCreatePic("Up.jpg", 780, 0, 20, 30, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Down = GUICtrlCreatePic("Down.jpg", 780, 520, 20, 30, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$UpDown = GUICtrlCreatePic("UpDown.jpg", 780, 30, 20, 100, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$UpDown1 = 30
For $i = 65 To 90
$Label[$Zaehler][0] = GUICtrlCreateLabel(Chr($i), $Left, $Top, 60, 80, BitOR($SS_NOTIFY, $SS_CENTER))
$Label[$Zaehler][1] = $Top
$Label[$Zaehler][2] = $Left
GUICtrlSetTip(-1, "ASCII [" & $i & "]")
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x414141)
$Label[$Zaehler][3] = GUICtrlCreateLabel(Chr($i), $Left + 10, $Top + 30, 40, 50, BitOR($SS_NOTIFY, $SS_CENTER))
GUICtrlSetFont(-1, $FontSize, $FontType1, $FontType2, $FontName)
GUICtrlSetBkColor(-1, 0x414141)
$Left = $Left + 70
If $Left = 780 Then
$Top = $Top + 90
$Left = 10
EndIf
$Zaehler = $Zaehler + 1
Next
$Top = $Top + 90
$Left = 10
For $i = 97 To 122
$Label[$Zaehler][0] = GUICtrlCreateLabel(Chr($i), $Left, $Top, 60, 80, BitOR($SS_NOTIFY, $SS_CENTER))
$Label[$Zaehler][1] = $Top
$Label[$Zaehler][2] = $Left
GUICtrlSetTip(-1, "ASCII [" & $i & "]")
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x414141)
$Label[$Zaehler][3] = GUICtrlCreateLabel(Chr($i), $Left + 10, $Top + 30, 40, 50, BitOR($SS_NOTIFY, $SS_CENTER))
GUICtrlSetFont(-1, $FontSize, $FontType1, $FontType2, $FontName)
GUICtrlSetBkColor(-1, 0x414141)
$Left = $Left + 70
If $Left = 780 Then
$Top = $Top + 90
$Left = 10
EndIf
$Zaehler = $Zaehler + 1
Next
$Top = $Top + 90
$Left = 10
For $i = 48 To 57
$Label[$Zaehler][0] = GUICtrlCreateLabel(Chr($i), $Left, $Top, 60, 80, BitOR($SS_NOTIFY, $SS_CENTER))
$Label[$Zaehler][1] = $Top
$Label[$Zaehler][2] = $Left
GUICtrlSetTip(-1, "ASCII [" & $i & "]")
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x414141)
$Label[$Zaehler][3] = GUICtrlCreateLabel(Chr($i), $Left + 10, $Top + 30, 40, 50, BitOR($SS_NOTIFY, $SS_CENTER))
GUICtrlSetFont(-1, $FontSize, $FontType1, $FontType2, $FontName)
GUICtrlSetBkColor(-1, 0x414141)
$Left = $Left + 70
If $Left = 780 Then
$Top = $Top + 90
$Left = 10
EndIf
$Zaehler = $Zaehler + 1
Next
$Top = $Top + 90
$Left = 10
For $i = 33 To 255
If $i >= 48 And $i <= 57 Or $i >= 64 And $i <= 90 Or $i >= 97 And $i <= 122 Or $i >= 129 And $i <= 144 Or $i = 127 Or $i >= 147 And $i <= 160 Then
Else
$Label[$Zaehler][0] = GUICtrlCreateLabel(Chr($i), $Left, $Top, 60, 80, BitOR($SS_NOTIFY, $SS_CENTER))
$Label[$Zaehler][1] = $Top
$Label[$Zaehler][2] = $Left
GUICtrlSetTip(-1, "ASCII [" & $i & "]")
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x414141)
$Label[$Zaehler][3] = GUICtrlCreateLabel(Chr($i), $Left + 10, $Top + 30, 40, 50, BitOR($SS_NOTIFY, $SS_CENTER))
GUICtrlSetFont(-1, $FontSize, $FontType1, $FontType2, $FontName)
GUICtrlSetBkColor(-1, 0x414141)
$Left = $Left + 70
If $Left = 780 Then
$Top = $Top + 90
$Left = 10
EndIf
$Zaehler = $Zaehler + 1
EndIf
Next
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Down
Down()
Case $Up
Up()
Case $InputFontSize
$Read = GUICtrlRead($InputFontSize)
$FontSize = $Read
Font()
Case $InputFontType
$Read = GUICtrlRead($InputFontType)
If $Read = "Standard" Then
$Content1 = 400
$Content2 = 0
ElseIf $Read = "Kursiv" Then
$Content1 = 400
$Content2 = 2
ElseIf $Read = "Fett" Then
$Content1 = 800
$Content2 = 0
ElseIf $Read = "Fett Kursiv" Then
$Content1 = 800
$Content2 = 2
EndIf
$FontType1 = $Content1
$FontType2 = $Content2
Font()
Case $InputFontName
$Read = GUICtrlRead($InputFontName)
$FontName = $Read
Font()
Case $InputFontColor
$Read = GUICtrlRead($InputFontColor)
If $Read = "Schwarz" Then
$Content = 0x000000
ElseIf $Read = "Weiß" Then
$Content = 0xffffff
ElseIf $Read = "Rot" Then
$Content = 0xff0000
ElseIf $Read = "Gelb" Then
$Content = 0xffff00
ElseIf $Read = "Grün" Then
$Content = 0x00ff00
ElseIf $Read = "Blau" Then
$Content = 0x0000ff
ElseIf $Read = "Dunkelrot" Then
$Content = 0x880000
ElseIf $Read = "Dunkelgelb" Then
$Content = 0x888800
ElseIf $Read = "Dunkelgrün" Then
$Content = 0x008800
ElseIf $Read = "Dunkelblau" Then
$Content = 0x000088
ElseIf $Read = "Andere Farbe" Then
$Color = _ChooseColor(2)
$Content = $Color
EndIf
$FontColor = $Content
Font()
EndSwitch
If _IsPressed(10) = 1 Then
Up()
EndIf
If _IsPressed(11) = 1 Then
Down()
EndIf
If _IsPressed(1) = 1 Then
UpDown()
EndIf
Sleep(10)
WEnd
Func Up()
If $Label[0][1] <> 10 Then
For $i = 0 To 190
GUICtrlSetPos($Label[$i][3], $Label[$i][2] + 10, $Label[$i][1] + 90 + 30)
GUICtrlSetPos($Label[$i][0], $Label[$i][2], $Label[$i][1] + 90)
$Label[$i][1] = $Label[$i][1] + 90
Next
$UpDown1 = $UpDown1 - 30
GUICtrlSetPos($UpDown, 780, $UpDown1)
EndIf
EndFunc ;==>Up
Func Down()
If $Label[190][1] <> 460 Then
For $i = 0 To 190
GUICtrlSetPos($Label[$i][3], $Label[$i][2] + 10, $Label[$i][1] - 90 + 30)
GUICtrlSetPos($Label[$i][0], $Label[$i][2], $Label[$i][1] - 90)
$Label[$i][1] = $Label[$i][1] - 90
Next
$UpDown1 = $UpDown1 + 30
GUICtrlSetPos($UpDown, 780, $UpDown1)
EndIf
EndFunc ;==>Down
Func UpDown()
$Pos = MouseGetPos()
$Pos1 = $Pos[1]
Sleep(10)
$Pos = MouseGetPos()
If $Pos[1] < $Pos1 Then Up()
If $Pos[1] > $Pos1 Then Down()
EndFunc ;==>UpDown
Func Font()
For $i = 0 To 190
GUICtrlSetFont($Beispiel, $FontSize, $FontType1, $FontType2, $FontName)
GUICtrlSetColor($Beispiel, $FontColor)
GUICtrlSetFont($Label[$i][3], $FontSize, $FontType1, $FontType2, $FontName)
GUICtrlSetColor($Label[$i][3], $FontColor)
Next
EndFunc ;==>Font