Coder Social home page Coder Social logo

docs's Introduction

Modular Font Editor K

Modular Font Editor K (MFEK) is an open source modular font editor. It attempts to apply the Unix adage that each program should do one thing and do it well to a GUI font editor.

MFEK is still very alpha, and many parts are missing. You can help!

Why MFEK?

To pull all modules, why not use this script?

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/MFEK/docs/master/blob/pull_all_modules.sh)"

To see who wrote an MFEK module, check its AUTHORS file. The two main authors of MFEK are Fredrick R. Brennan (@ctrlcctrlv) and Matthew Blanchard (@MatthewBlanchard).

Current roadmap as of 2021-11-02

Current roadmap as of 2021-11-02

Roadmap key

  • Dotted line around module name — module not started.
  • Dashed line around module name — module started, yet far from completion.
  • No line around module name — module is still far from being begun, and may indeed be unnecessary and never be begun.
  • A bold black arrow represents a program calling a program.
  • A red arrow represents a program including a library.
  • A black arrow represents a library including a library.
  • All libraries and programs are assumed to be in Rust unless noted otherwise.

Modular programs

  • MFEKglif (.glif editor w/planned Spiro support)
  • MFEKpathops (applies different kinds of operations to .glif paths)
  • MFEKstroke (applies different kinds of strokes to .glif files with open contours)
  • MFEKmetadata (UFO metadata querier)
  • MFEKabout (MFEK's about screen)

Planned

  • MFEKufo (a launcher for MFEKglif that displays all glyphs)
  • MFEKdesignspace (design space XML creator/editor)
  • MFEKmetrics (load UFO file into HarfBuzz and output typed text, edit horizontal/vertical kerning and bearings, test interpolation)
  • MFEKopentype (OpenType layout editor based on @simoncozens' ideas)
  • MFEKexport (frontend to fontmake)

Far off

  • MFEKpshints (Add PostScript hints to glyphs and test them)
  • MFEKtruetype (basically would be an open source version of Visual TrueType (VTT))

Libraries

  • glifparser.rlib (a .glif parser)
    • integer-or-float.rlib (implements a .glif data type)
    • (We need this because Norad has no support for <lib> in .glif files, and due to how they went about implementing Norad, fixing that is trickier than having my own glyph parser. Furthermore, as I plan to support Spiro, B-Splines, etc., through UFO format extensions, I should have one anyway.)
  • icu-data.rlib (Unicode ICU data without C libicu, currently only encodings)
  • ipc.rlib (very basic inter-process communication functions)
  • math.rlib (implements algorithms for MFEKstroke: Pattern-Along-Path, Variable/Constant Width Stroke, etc.)
  • spiro.rlib (a Rust implementation of Raph Levien's Spiro curve type)
  • feaparser.rlib (an OpenType Feature File Format [.fea] parser)
  • glifrenderer.rlib (a Skia renderer focused on rendering font glyphs in a pleasing way)

Planned

  • libskef (Port of @skef's «Expand Stroke» feature to a reusable C API. Will likely also require SplineSet type from FontForge.)

Flow

MFEK's inter-process communication (IPC) will be minimal. UFO is the format, and most of the time, MFEK modules are going to be starting with just what's on the disk. We can put the planned MFEK modules onto a linear spectrum between forms and canvases. The quintessential form is MFEKdesignspace: it is purely a form. The user inputs the names of their UFO masters, their axes, instances, and rules, and out comes a rigidly hierarchical .designspace file for consumption by fontmake and MFEKinterpolate. As a form, once it's filled out, it's done. We may need to go back and add more rules or instances or what have you, but it's essentially one run and done. Meanwhile, the quintessential canvas is MFEKglif: the user draws their glyphs and can spend as long as they want doing so, and will likely have multiple MFEKglif instances running in parallel. As long as you're working on the font, MFEKglif will probably be open most of the time.

MFEKstroke is an interesting example because it's in between. The user needs to fill out a form, yes, the stroke parameters — but she also needs to see what the glyph will look like with the parameters, and tweak them to her heart's content to get the best output. However, once parameters are chosen, it becomes almost pure form. It is both form and canvas, as is MFEKinterpolate. MFEKopentype and MFEKkern, meanwhile, have some form elements, but are more canvas than form.

Most of our IPC can just be system calls (launching new processes). At our most advanced, we watch a file or directory for changes and reconcile accordingly.

Let's consider we want to make a cursive font. Here is how we would proceed, according to my vision:

  • Run MFEKmetadata. When it gets no argument, or the argument of a non-existent directory, it assumes we want a new font. So, we fill out a form.
  • We then run MFEKufo and see empty squares. Clicking A launches MFEKglif with the command line MFEKglif glyphs/A_.glif.
    • MFEKglif calls MFEKmetadata as MFEKmetadata metrics. MFEKmetadata returns on stdout the em-size, ascender, descender, and x-height and cap-height if known based on the UFO metadata. MFEKglif draws guidelines.
  • We start drawing our A. We decide to make it a single stroke. We press Ctrl-Shift-E, and MFEKglif launches MFEKstroke, saves the state of the glyph in the undoes list, and begins monitoring A_.glif for changes.
  • MFEKstroke, likewise, monitors A_.glif. If written out, it changes its display. Perhaps auto-saving of every action can be optionally considered. How daring are we? Will our .glif file's <lib> contain undoes? Perhaps!
  • The user settles on a stroke and presses Stroke. MFEKstroke writes and exits. MFEKglif dutifully reads from the disk.
  • And so on for the basic Latin. It's come time to add an OpenType table. Launch MFEKopentype, which will build the font and use HarfBuzz to display it, and auto-update as the user writes their OpenType Layout code. This could be FEA, but it also could be Simon Cozens' FEZ, a higher level FEA-like syntax. MFEKopentype must be more conservative and only reload the font upon saving of any glyph, not every small action in MFEKglif.
  • Finally, we have something we think servicable. In MFEKufo we press Generate, which calls MFEKexport. We're not writing a TrueType generator here, it's a simple form that calls fontmake with appropriate arguments.

Notice that while MFEK grows in size, we can offload one or more steps to FontForge/fontmake scripts. So even with only one or two programs, MFEK is immediately useful—we don't need the entire thing done to start using it in production. In fact, I plan to make fonts while I work on MFEK, and use less and less of FontForge over time.

But our goal is not to totally abandon FontForge, or AFDKO, or fontmake. No, rather, we want a new GUI. But to build our modular font editor, we'll take the good parts out of everything. FontForge is great at dealing with legacy formats: we can imagine a MFEKconvert based on a C library sourced from FontForge code, which calls either that, fontmake, or AFDKO, based on the type of conversion requested.

Code of Conduct (CoC)

See CODE_OF_CONDUCT.md. The MFEK CoC there, last updated 17th November 2021, is that of the whole organization and all of the repositories and communication channels under its umbrella.

Thanks to…

  • Matthew Blanchard;
  • Caleb Maclennan;
  • Dave Crossland;
  • Simon Cozens;
  • Eli Heuer;
  • Georg Duffner (for EB Garamond ExtraBold, used in our logo);
  • All organization members, module authors and contributors;
  • All developers of open source font-related software and fonts!

docs's People

Contributors

ctrlcctrlv avatar davelab6 avatar matthewblanchard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

davelab6

docs's Issues

Development sprint of August 29, 2021 – October 15, 2021

Due to a plateau in progress, the MFEK Core Team† met today (August 26, 2021) to figure out how to get the project unstuck. I'm developing a companion font to FRB American Cursive, consisting of two forms of block letters, a regular letter and an italic letter. As part of this project, I'm going to rebuild the cursive as well, with the updates to MFEKstroke to improve its design characteristics in critical areas. The title this project has, “Noto Hand”, is aspirational—@davelab6 wants to publish what I do finish on Google Fonts, but whether this actually becomes a Noto font in the end, or I have to give it another name, really entirely depends on what we achieve here.

So, let's shoot for the moon and hopefully land somewhere in the stars if not on the moon itself.

FRB American Cursive is the first production font to heavily rely on MFEK. However, it makes use of a lot of third party tools to fill in gaps in MFEK's functionality. To unstick the project, we will remove especially Inkscape and FontForge, the large GUI tools required. We will make improvements to MFEKstroke such as benefit Noto Hand. My ultimate goal is that where FRB American Cursive has a very complex, bespoke build process which is full of hardcoded paths, hardcoded glyph names, unexplained numbers, undocumented data files, and arcane UFO “fudging”*, the builds for these first three Noto Hand fonts will all rely on the same repository to build them, and will only require MFEK, fontTools, and fontmake. Hopefully we come out of this with a system for building skeleton fonts based on single strokes…if that's achieved, this really could become a Noto family, with people with knowledge of different scripts producing educational fonts for that script, or style of script.‡

We have divided this sprint into seven weeks. Work weeks begin on Sundays. Saturdays are off.

  • Week 1: 29 August – 3 September (28 August off)
  • Week 2: 5 September – 10 September (4 September off)
  • Week 3: 12 September – 17 September (11 September off)
  • Week 4: 19 September – 24 September (18 September off)
  • Week 5: 26 September – 1 October (25 September off)
  • Week 6: 3 October – 8 October (2 October off)
  • Week 7: 10 October – 15 October (9 October off)

Goal A — Improve MFEKstroke

  • - Pattern overwriting - Week 1 Matt
  • - Pattern alignment begin/end - Week 1 Matt
  • - Stroke specific contour (--contour 0) - Week 1 Matt
  • - Add dash mode to MFEKStroke - Week 2 Matt
  • - Add path reverse mode -- Week 2 Matt

Goal B — Make Noto Hand rely on MFEK and not FontForge or Inkscape at all

(All to be done by Fred during Week 1.)

  • -patterns.mk: remove patterns sfd make ufo pattern source -
  • -buildccmp.py: replace fontforge with fonttoolls.ufolib
  • -delete sfd and use ufos natively
  • -list_glyphs use fonttools.ufolib

Editor related Goal B tasks

  • - Guideline picking needs fix. -- Week 3 Matt
  • - Refactor needs testing. -- Week 2 Fred
  • - Fix color output. (low priority) -- Week 7? Fred

Font

(All to be done by Fred during weeks 3–4.)

  • - Cyrillic for Italic + Regular -- Week 3
  • - Review google list of required glyphs. -- Week 3
  • - Spacing and alignment -- Week 4

Goal C — MFEKufo (font view)

Plan here is TODO. For weeks 4–6; Matt & Fredrick.

Week 7 — Polish and look for bugs in all of the above.


† Heh, lofty title for myself and @MatthewBlanchard. @davelab6 was there for some of the planning of this sprint.
* Literally, there's a script that runs as part of the build process named fudge_fontinfo.py.
‡ Normal Noto project Sans/Serif are named after Unicode blocks. However, we have to be far more open about our naming here because of the wide diversity of “standard” type designs used to teach children handwriting around the world, some of which are even enshrined in law in some countries or by recommendations of national bodies. Therefore, the naming scheme is for now “Noto Hand DEMONYM STYLE”, where STYLE is attempted to be generalized as one of “Cursive”, “Print”, or “Italic”, as I feel this can apply broadly to the educational fonts used in many countries of diverse scripts. This naming scheme hasn't been come up with by Noto project, I came up with it, and it's subject to change. For example, while both Parisian French and American English are written in the Latin alphabet, very different influences were had on their textbook hands, leading to the American focusing heavily on connection and being heavily slanted while the French is upright and sees lifting the pen as no great sacrifice.

FEZ is now in its own repo

The link in the "Flow" section points towards Simon Cozen's fontFeatures repo, but it should point towards https://github.com/simoncozens/fez

Eventually we might want to put a Cargo workspace in this repository

I have a very basic pre-alpha Qstroke in the works with Simon's library, which is making me think: with Qstroke, Qmetadata, and Qglif, it's getting to be a lot of modules, and this will only increase.

I'm going to want to perhaps make this toplevel repo a Cargo workspace with Git submodules for every MFEQ module and a quick instruction about recursive Git submodule initialization.

Consider adding a DrawBot clone to the roster of modular programs

https://www.drawbot.com/
https://github.com/typemytype/drawbot
typemytype/drawbot#121
https://robofont.com/tags/#drawbot
https://pythonfordesigners.com/

DrawBot is Mac-only software that is commonly used in the type industry for making specimen images, animations, booklets, etc. A tool like this is something I would like to see in a modular font editor.

There have been attempts to make clones in the past:

In my opinion, past attempts have struggled due to lack of 1:1 compatibility with DrawBot, there are lots of DrawBot scripts available and used in existing projects, so breaking compatibility will make getting new users more difficult.

However, maybe something like DrawBot but for Rust instead of Python would be the best way to go?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.