Jump to content

Search the Community

Showing results for tags 'fonticon'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. ; #include <FontConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Local $hGUI = GUICreate("Example", 200, 200) ; 2023.03.12 FontIcon! Local $sFont, $s ; define reusable vars $sFont = "Segoe UI Symbol" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- set font, Font Size does not affect Menus $s = ChrW(0xE160) ; hand $idFilemenu = GUICtrlCreateMenu($s & " &File Index ") $sFont = "Segoe UI Symbol" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- set font, Font Size does not affect Menus $s = ChrW(0xE203) ; OK Local $idFileItem = GUICtrlCreateMenuItem($s & " File Option", $idFilemenu) GUICtrlCreateMenuItem("", $idFilemenu) ; create a separator line $sFont = "Segoe UI Symbol" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- set font, Font Size does not affect Menus $s = ChrW(0x26DD) ; box with cross Local $idExit = GUICtrlCreateMenuItem($s & " Exit ", $idFilemenu) $sFont = "Segoe MDL2 Assets" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- make font size half of button dimensions $s = ChrW(0xE2F6) Local $iconPrint = GUICtrlCreateButton($s, 8, 28, 48, 48) ; <-- button containing fonticon $sFont = "Segoe UI Emoji" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- make font size half of button dimensions $s = ChrW(0x2668) Local $iconMedal = GUICtrlCreateButton($s, 60, 28, 48, 48) ; <-- button containing fonticon $sFont = "Segoe UI Symbol" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- make font size half of button dimensions $s = ChrW(0xE129) Local $iconPennon = GUICtrlCreateButton($s, 112, 28, 48, 48) ; <-- button containing fonticon ; take care to reset to an easy read font $sFont = "Segoe" GUISetFont(12, 400, 0, $sFont) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idExit ExitLoop Case $iconPrint MsgBox(0, "FontIcon", "You have clicked a FontIcon!") Case $iconMedal MsgBox(0, "FontIcon Emoji", "Hotstuff!") Case $iconPennon MsgBox(0, "FontIcon Symbol", "Keep the Flag flying") Case $idFileItem MsgBox(0, "Menu Item!", "Do Something!") EndSwitch WEnd GUIDelete($hGUI) A picture paints a thousand words, and having access to icons often contributes to the aesthetics of a GUI. It's not always easy or convenient to make icon files, or compile these into a DLL for later use. Fortunately the onboard Windows Segoe font family provides access to a whole set of font icons. A font icon is a font character that does not paint a letter, but a picture, like an emoji. Using a FontIcon also allows placing images directly into menu items, which would otherwise require a lot of work
  2. I'm written this UDF with purpose to help you can write cool Icon in your project by used FontAwesome easily. - Have 634 cool icons. - Based on FontAwesome orginal. - Easy to use with IconName (You can get Icon Name at this site: http://fontawesome.io/icons) - You can use different version of FontAwesome(must be use CSS (font-awesome.css) in "FontAwesome Source") with _FontAwesome_Load($sFontFile, $sCSSFile) function because CSS file contain UnicodeHex of IconName. Example: _FontAwesome_Load("Awesome\fonts\FontAwesome.otf", "Awesome\css\font-awesome.css") Default _FontAwesome_Load() use FontAwesome V4.6.3 (Base64Encoded) with __FontAwesome_HexTable() function return UnicodeHex of IconName. Screenshot Example #This Script was written by TNV #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include "_FontAwesome_UDF.au3" #Region Load Fontawesome _FontAwesome_Load() ;Default use FontAwesome V4.6.3 and HEXTable function ;~ _FontAwesome_Load("Awesome\fonts\FontAwesome.otf", "Awesome\css\font-awesome.css") ;Load custom Font, and custom HexTable CSS #EndRegion ;To get Icon name, you can visit website: http://fontawesome.io/icons GUICreate("FontAwesome UDF V1.0 Example - TNV", 408, 128, 192, 124, -1, BitOR($WS_EX_APPWINDOW,$WS_EX_WINDOWEDGE)) GUICtrlCreateLabel(_FontAwesome_Icon("desktop"), 48, 48, 64, 29, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 16, 400, 0, "FontAwesome") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) GUICtrlCreateLabel(_FontAwesome_Icon("edit"), 128, 48, 64, 29, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 16, 400, 0, "FontAwesome") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) GUICtrlCreateLabel(_FontAwesome_Icon("dashboard"), 208, 48, 64, 29, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 16, 400, 0, "FontAwesome") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) GUICtrlCreateLabel(_FontAwesome_Icon("envelope-o"), 288, 48, 64, 29, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 16, 400, 0, "FontAwesome") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I come from Vietnamese so my English not good! (c) Nguyễn Việt Thái (TNV) FontAwesome_UDF.zip
×
×
  • Create New...