Glyph editor for the Modular Font Editor K project.
MFEKglif mixes three technologies: Skia, a powerful path rasterizer and manipulation library; Dear ImGui, an immediate mode GUI toolkit; and Rust, a modern high-performance systems language.
I wrote it after, hopefully, learning from the mistakes made by George Williams in FontForge, after being a user of FontForge for six years and a co-maintainer for one and a half years.
MFEKglif is the flagship program of the Modular Font Editor K project, which aims to create a full font editor by making many small programs that all work together, fulfilling the Unix adage that each program should have one task and do that task well. MFEKglif aims to do the task of creating and editing glyphs well.
To make this as easy as possible to build, and cross-platform without hassle, resources are compiled into the binary via the Rust include_str!
macro, and MFEKglif is statically compiled.
MFEKglif is still alpha-quality software, and a numbered release hasn't been made yet. Before 1.0 is out, though, you can test it out with the artifacts function in GitHub. Go to «Actions», choose a commit, and download the artifact for your OS. Three are uploaded: MFEKglif-linux, MFEKglif-windows, and MFEKglif-macos (not notarized).
MFEKglif currently does not have the ability to write errors or warnings to the screen through dialog boxes or its GUI, which most Windows applications do and are expected to do. We write them to stderr
, as Unix applications do. We will eventually use MFEKglif's built in console (which appears when you press :), but for now for best results, and to see the error if you get a crash or MFEKglif does not open, please run MFEKglif through MSYS2
or Cmder
.
Apple charges a fee to "notarize" applications and without this "notarization" MFEKglif will not run correctly, or in some cases, at all. So, for the foreseeable future, you must build MFEKglif from source on OS X. This is not as hard as it sounds! :-)
- Download and install the Vulkan SDK.
MFEKglif depends on GTK3 (for the open/save dialogs). If using X11 and not Wayland, it depends on the X11 C shape extension (libxcb-shape.so.0
) and the xfixes extension (libxcb-xfixes.so.0
). Their header files are also needed: /usr/include/xcb/shape.h
and /usr/include/xcb/xfixes.h
.
On Arch Linux, these two packages provide all the dependencies: gtk3
libxcb
On Ubuntu, these three packages provide the dependencies: libgtk-3-dev
libxcb-shape0-dev
libxcb-xfixes0-dev
- Download and install
rustup
, selecting thenightly
toolchain. - Pull this repository, and finally
- Run the below command to get started.
If you previously pulled the repository and get errors related to glifparser
, mfek-ipc
, or another local unstable dependency, try running cargo update
to force Cargo to pull the latest versions from GitHub.
I typically build and run MFEKglif like this:
RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- examples/Q_.glif
We welcome all contributions! Please open an issue first so we can discuss before you make big changes so no effort is wasted.
It is possible to get even more debug output out of MFEKglif for figuring out where problems lie. To ask MFEKglif to dump the parsed .glif file on runtime, pass DEBUG_DUMP_GLYPH=Y
. To see every single winit
event (warning: this will flood your stdout) pass DEBUG_EVENTS=Y
.
Contributions which do not work on at least GNU/Linux and Windows will be rejected; we want to be able to build MFEKglif on as many platforms as possible. Both Skia and Dear ImGui are cross-platform; we use Vulkan and not OpenGL so we are future-proof even on OS X.
Copyright 2020–2021 Fredrick R. Brennan, Matthew Blanchard & MFEK Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software or any of the provided source code files except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
By contributing you release your contribution under the terms of the license.