- Notifications
You must be signed in to change notification settings - Fork24
A desktop app to import, edit and export fonts as byte arrays for use in embedded systems
License
ayoy/fontedit
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
FontEdit is a desktop application that allows you to convert general-purposefixed-width desktop fonts to byte array representation that's suitable foruse in embedded systems displays.
It's written in C++ with Qt UI and was tested on Windows, Linux and MacOS.
Read more about it inthe blog post.
With FontEdit you can:
- import fonts from the operating system - to load a custom font, you shouldfirst register it in your OS,
- edit individual font glyphs after importing - automatic import is a best-effortoperation and although the font should be usable right after importing, youmight want to tweak it so that it looks better,
- add new glyphs to a font document - either by copying an existing glyph, startingfrom scratch or adding a glyph from a character you input (useful for addingnon-ASCII characters to your font),
- export the font as source code (in a form of byte array) suitable for Arduino,C/C++ or Python,
- save your progress to a file - the font document file is cross-platform so you cane.g. import and edit it on MacOS and then move to RPi and export the code from there,
- as of 1.1.0 you can do partial exports, i.e. export only a bunch of font charactersthat you really need for your application (read more inthis blog post).
You can edit font glyphs with a minimal editor that's controlled with a mouseand keyboard. Click and drag the mouse to set pixels (making them black), holdAlt or Ctrl (⌘) to erase. Use touchpad scroll (mouse wheel) with Ctrl (⌘) to zoomthe editor canvas.
You can also reset the current glyph or the whole font to their initial state(from latest save). The editor supports Undo/Redo for most operations.
The font data can be exported to:
- a C file (also suitable for use with C++),
- an Arduino-specific C file (using PROGMEM),
- a Python list or bytes object (both compatible with Python 2.x/3.x and MicroPython).
You can switch between MSB and LSB mode, invert all the bits, and conditionally includeline spacings in font definition (not recommended unless you have a very good reasonfor it). The tab size can be configured.
TheReleases GitHub page containspackages for:
- Ubuntu/Debian (amd64),
- Raspbian Buster (armhf),
- MacOS,
- Windows.
Prerequisites:
- Qt (tested with >= 5.9)
- cmake (3.9 or newer)
- C++ compiler that supports C++17
Follow these steps to build the app from the source code:
Clone the Git repository:
$ git clone https://github.com/ayoy/fontedit$ cd fontedit
Check out Git submodules:
$ git submodule update --init
Build with CMake:
$ mkdir build$ cd build$ cmake -DCMAKE_BUILD_TYPE=Release ..$ make
(Optionally) Install on Linux with:
make install
or create a dmgimage on MacOS withmake dmg
.
Please report bugs and feature requests viaGitHub Issues or as apull request.
© 2020 Dominik Kapusta
This app is distributed in accordance with GPL v3. SeeLICENSE for details.The app uses icons fromwww.flaticon.com made bySmashicons,Freepik andPixel perfect.
About
A desktop app to import, edit and export fonts as byte arrays for use in embedded systems
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.