Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Load Font directly from Font-File?

Load Font directly from Font-File?

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminhelpquestion
6 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AskQuestion
    wrote on last edited by
    #1

    Hi. Is it possible to load a font directly from a font-file (*.ttf etc in an ordinary path) without registring the file in the system font tables (registry etc)? thanks for the help, and good luck for your own projects

    C A 2 Replies Last reply
    0
    • A AskQuestion

      Hi. Is it possible to load a font directly from a font-file (*.ttf etc in an ordinary path) without registring the file in the system font tables (registry etc)? thanks for the help, and good luck for your own projects

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      see CreateScalableFontResource, AddFontResource, RemoveFontResource etc.. Cleek | Image Toolkits | Thumbnail maker

      1 Reply Last reply
      0
      • A AskQuestion

        Hi. Is it possible to load a font directly from a font-file (*.ttf etc in an ordinary path) without registring the file in the system font tables (registry etc)? thanks for the help, and good luck for your own projects

        A Offline
        A Offline
        AskQuestion
        wrote on last edited by
        #3

        Thanks Chris but see -Font files must be in the SYSTEM subdirectory of the WINDOWS directory to be used by the AddFontResource function. -The CreateScalableFontResource function is used to install TrueType fonts -The EnumFontFamiliesEx function enumerates all fonts in the system that match the font characteristics.. I want to load a Font directly for a *.ttf or *.fon file. This file can be everywhere ( CD..) Never the less thank you very much for trying to help me

        D C 2 Replies Last reply
        0
        • A AskQuestion

          Thanks Chris but see -Font files must be in the SYSTEM subdirectory of the WINDOWS directory to be used by the AddFontResource function. -The CreateScalableFontResource function is used to install TrueType fonts -The EnumFontFamiliesEx function enumerates all fonts in the system that match the font characteristics.. I want to load a Font directly for a *.ttf or *.fon file. This file can be everywhere ( CD..) Never the less thank you very much for trying to help me

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          AskQuestion wrote:

          -Font files must be in the SYSTEM subdirectory of the WINDOWS directory to be used by the AddFontResource function.

          So just copy the .fon or .ttf file(s) to the Fonts folder before calling AddFontResource().


          "Take only what you need and leave the land as you found it." - Native American Proverb

          1 Reply Last reply
          0
          • A AskQuestion

            Thanks Chris but see -Font files must be in the SYSTEM subdirectory of the WINDOWS directory to be used by the AddFontResource function. -The CreateScalableFontResource function is used to install TrueType fonts -The EnumFontFamiliesEx function enumerates all fonts in the system that match the font characteristics.. I want to load a Font directly for a *.ttf or *.fon file. This file can be everywhere ( CD..) Never the less thank you very much for trying to help me

            C Offline
            C Offline
            Chris Losinger
            wrote on last edited by
            #5

            i don't know about .FON files, but for a .TTF file, see this Google thread[^] Cleek | Image Toolkits | Thumbnail maker

            A 1 Reply Last reply
            0
            • C Chris Losinger

              i don't know about .FON files, but for a .TTF file, see this Google thread[^] Cleek | Image Toolkits | Thumbnail maker

              A Offline
              A Offline
              AskQuestion
              wrote on last edited by
              #6

              thx Chris it took a while to understand, since the help in msn isn't correct.:) AddFontResource.. really worked. thx again, you really have been a great help

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups