All Projects → MFEK → glif

MFEK / glif

Licence: Apache-2.0 license
A stand-alone glyph viewer and editor (UFO .glif). (ꞵ quality)

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to glif

ufolint
UFO source format linter
Stars: ✭ 23 (-83.92%)
Mutual labels:  ufo, glif
not-on-facebook-icon
𝐅 A font icon to say "I am not on facebook"
Stars: ✭ 29 (-79.72%)
Mutual labels:  glyphs
Curve-Equalizer
Curve Equalizer for Glyphs and RoboFont
Stars: ✭ 42 (-70.63%)
Mutual labels:  glyphs
QtSkia
Qt with skia
Stars: ✭ 94 (-34.27%)
Mutual labels:  skia
Operator Mono Lig
Add ligatures to Operator Mono similar to Fira Code
Stars: ✭ 2,683 (+1776.22%)
Mutual labels:  glyphs
neovide
No Nonsense Neovim Client in Rust
Stars: ✭ 9,351 (+6439.16%)
Mutual labels:  skia
beatrix
A tool to chop off useless fonts glyphs and convert TTF/OTF into WOFF & WOFF2
Stars: ✭ 22 (-84.62%)
Mutual labels:  glyphs
REDM
REDM是一套基于商业化标准的开源directui界面框架,不仅能提供完善的项目管理方案、详细的文档框架,也可轻松协助完成可视化界面设计,其核心库的稳定性已在内部多个大型商化项目中通过验证。
Stars: ✭ 41 (-71.33%)
Mutual labels:  skia
SvgToXaml
Svg to xaml conveter.
Stars: ✭ 45 (-68.53%)
Mutual labels:  skia
SkiaKit
Swift Bindings to the Skia 2D graphics Library
Stars: ✭ 95 (-33.57%)
Mutual labels:  skia
alt-hack
A stylistic alternate glyph library for the Hack typeface
Stars: ✭ 85 (-40.56%)
Mutual labels:  glyphs
XEIcon
Beautiful transformable iconic font made for the web.
Stars: ✭ 85 (-40.56%)
Mutual labels:  glyphs
glyphhanger
Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
Stars: ✭ 422 (+195.1%)
Mutual labels:  glyphs
Opentype.js
Read and write OpenType fonts using JavaScript.
Stars: ✭ 3,393 (+2272.73%)
Mutual labels:  glyphs
Extrude-Tool
Glyphs.app plugin to extrude paths
Stars: ✭ 13 (-90.91%)
Mutual labels:  glyphs
alien-script-generator
Procedurally generated front for alien languages
Stars: ✭ 17 (-88.11%)
Mutual labels:  glyphs
skia4delphi
Skia4Delphi is a cross-platform 2D graphics API for Delphi platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
Stars: ✭ 486 (+239.86%)
Mutual labels:  skia
SkiaSharp.QrCode
Qr Code Generator with Skia. (no System.Drawing)
Stars: ✭ 72 (-49.65%)
Mutual labels:  skia
glisph
Glyph rendering engine using OpenGL shading language for Common Lisp.
Stars: ✭ 32 (-77.62%)
Mutual labels:  glyphs
Hauora-Sans
Neo-grotesque sans-serif font originally designed for an open-sourced health research project
Stars: ✭ 83 (-41.96%)
Mutual labels:  glyphs

MFEKglif

Glyph editor for the Modular Font Editor K project. Build Status

Current beta release: v1.1.1ꞵ2 “ᴍᴇᴛᴀꜰᴏɴᴛverse”

Binaries (links in § Artifacts)

  • Linux
  • Windows
  • macOS (not notarized — please also read notes in § Running from artifacts → Mac users)

Overview

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 by default to its C dependencies.

Keys

Note: This is a basic list to get you started. A complete list can be found in resources/default_keymap.xml. You may copy this file to e.g. $HOME/.config/MFEK/glif/keybindings.xml on Linux and modify it.

I/O

For more information, see § “I/O Help”.

  • CtrlO — Open user-specified .glif or .glifjson file
  • CtrlS — Save current glyph in a multi-layered .glifjson file
  • CtrlShiftS — Save current glyph in a multi-layered user-specified .glifjson file
  • CtrlU — Flatten the topmost layer, and overwrite current .glif with it
  • CtrlShiftU — Flatten the topmost layer, and write it to a user-specified .glif file
  • CtrlE — Export the multi-layered .glif to different glyphs/ directories for each layer, with layerinfo.plist and update layercontents.plist for each.

Tools

  • A — Select «Pan» tool
  • P — Select «Pen» tool
  • V — Select «Select» tool
  • Z — Select «Zoom» tool
  • AltD — Select «Dash Along Path» tool
  • AltP — Select «Pattern Along Path» tool
  • W — Select «Variable Width Stroke» tool
  • M — Select «Measure» tool
  • N — Select «Anchors» tool
  • S — Select «Shapes» tool

Selection

  • CtrlA — Select all points in current layer
  • Backspace — Delete currently selected points

Running from artifacts

MFEKglif is still beta-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).

Building

Mac users

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! :-)

Linux users

MFEKglif depends on GTK3 (for the open/save dialogs) and SDL2 (for windowing). 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 three packages provide all the dependencies: gtk3 libxcb sdl2

On Ubuntu, these four packages provide the dependencies: libgtk-3-dev libxcb-shape0-dev libxcb-xfixes0-dev sdl2-dev

Adding .desktop shortcut

I provide a .desktop shortcut in resources/ as MFEKglif.desktop. To install it, assuming MFEKglif is in your $PATH:

  1. Copy the icon to $XDG_HOME. On my system, the command was mkdir -p ~/.local/share/icons/hicolor/512x512/apps/ && cp resources/MFEKglif.png ~/.local/share/icons/hicolor/512x512/apps/MFEKglif.png.
  2. Run desktop-file-install --dir=~/.local/share/applications ~/MFEKglif.desktop to install locally (also depends on $XDG_HOME, or run it as root without --dir to install the .desktop icon globally.
  3. Run update-desktop-database on the directory used in step 2.

For everyone

  • Download and install rustup, selecting either the nightly or stable toolchain. MFEKglif builds on both as of 7 November 2021.
  • Pull this repository, and finally…
  • Compile the project. An example command is in § Contributing; you may also find the provided Makefile helpful.

Errors?

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.

Note on system SDL2

By default, MFEKglif compiles and statically links to SDL2 if not on Linux. If you have SDL2 installed, or find compiling it difficult for some reason and wish to link to a binary SDL2, you should provide the flag --features=sdl2-dynamic to cargo build. This will disable the features sdl2/bundled and sdl2/static-link, and your system will attempt to link to a dynamic libSDL2.

I/O Help

It's worth taking a moment to explain MFEKglif's I/O. Before November 6, 2021, a complex system was used to save private MFEKglif UFO .glif extensions to the standard .glif format. This became too confusing, both for users and developers, and was removed.

MFEKglif considers UFO .glif as an import format, and its own native format is .glifjson, which is just a JSON file with keys and values it understands. This is because MFEKglif supports multi-layered glyphs, variable-width stroking, pattern-along-path, and many other features that are of course not in standard .glif; others, such as Spiro and Hyperbézier curves, are planned.

So, when you save (Ctrl+S), MFEKglif will write a file named a.glifjson if you had open a.glif. To get back out UFO .glif output, you have to do one of the several export abilities MFEKglif has. If you instead save with Ctrl+U, you'll be given a dialog asking you a name for your output .glif file. If you save with Ctrl+Shift+U, MFEKglif will overwrite whatever the current filename is as a .glif, so if you've opened a.glif, it'll overwrite that; if you've opened a.glifjson, it'll write to a.glif. This flattens all layers, so you may instead want MFEKglif's most complex (and therefore potentially buggy! please open any issue you find) mode of saving: exporting—Ctrl+E. This will create a new directory for every layer in your glyph and save the layer into it, flattening layer groups.

Contributing

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.

More debug output

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 MFEK_DEBUG_DUMP_GLYPH=Y. To see every single sdl2 event (warning: this will flood your stdout) pass MFEK_DEBUG_EVENTS=Y.

Backtrace logging

By default, MFEKglif writes its backtraces to your temporary directory (it outputs the filename on crash as well). You should share these when reporting a crash; you may stop them from being written with the environment variable MFEK_BACKTRACE_NO_WRITE=Y.

To quiet all potentially useful information from a crash, set MFEK_QUIET_CRASH=Y.

Adding icons

Icons are themselves .glif files, see resources/fonts/MFEKglifIconFont.ufo/glyphs. Once you add a glyph to the UFO, you can rebuild the font (provided you have fontmake) with make iconfont.

Goals

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.

Contibutions will also be judged on how well they fit into the MFEK project as a whole. It's possible that your idea fits better into another module and not MFEKglif; we can help you figure out where it should go.

«Issues» vs. «Discussions»

If you find a bug in MFEKglif, please open the bug against this repository in «Issues». Your bug may be moved by a maintainer (as of 4 January 2022 Fred Brennan/@ctrlcctrlv is the only MFEK maintainer) to the bug tracker of another MFEK module or library, considering only where the code resides that your issue concerns, not the module you're using. When in doubt as to which repository is correct, just use this one—let Fred figure it out.

To discuss the MFEK project/offer ideas/report your experience, (good or bad!) and not report a bug, please open a thread in «Discussions». «Discussions» is not at all strict about repository hygeine, so you may discuss anything related to MFEK there.

License

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].