Skip to content

Extract and copy the corresponding OTF/TTF/TTC font file from a LOGFONT struct generated by the user input in a CFontDialog on Windows platform.

Notifications You must be signed in to change notification settings

Conglang/LOGFONT_to_FontFile

Repository files navigation

#LOGFONT to FontFile

Extract and copy the corresponding OTF/TTF/TTC font file from a LOGFONT struct generated by the user input in a CFontDialog on Windows platform.

Support most fonts of English and Chinese.

The idea is:

  1. Scan all "font name/file name" matches in registry.
  2. Scan font folder path in registry.
  3. Scan all font files(TTF/OTF/TTC) for their other names beside the registered one.
  4. Make a dictionary of "font name/file path" matches.
  5. When given a LOGFONT, search for its lfFaceName in the dictionary.
  6. Use FILE to copy font files to a target folder.

Complemented in a rather simple straight-forward way. For a better structured solution WATCH THIS.

References:

About

Extract and copy the corresponding OTF/TTF/TTC font file from a LOGFONT struct generated by the user input in a CFontDialog on Windows platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published