These are chat archives for caryll/otfcc

18th
Jul 2016
Georg Seifert
@schriftgestalt
Jul 18 2016 09:08
you should get one ;)
Belleve Invis
@be5invis
Jul 18 2016 09:09
Well, have to solve poverty first :)
(Kidding
Georg Seifert
@schriftgestalt
Jul 18 2016 09:10
if you could code
on a mac, I could hire you ;)
Belleve Invis
@be5invis
Jul 18 2016 09:10
Wow
Well, actually, I will graduate in the next year...
Maybe I should send you my CV ;)
Belleve Invis
@be5invis
Jul 18 2016 09:16
BTW Cosmio, I've checked out compreff, and its C interface is not sufficient for a complete subroutinization implementation.
Georg Seifert
@schriftgestalt
Jul 18 2016 09:16
I see that you can code from the otfcc core. But would need you to be able to run stuff on a mac and have a basic understanding of the Mac frameworks.
Belleve Invis
@be5invis
Jul 18 2016 09:17
Given that the current Charstring builder is IL-based, perhaps I should implement a subroutinizer in the IL level.
Georg Seifert
@schriftgestalt
Jul 18 2016 09:17
what is IL?
Belleve Invis
@be5invis
Jul 18 2016 09:17
intermediate language
A concept in compiler design
Georg Seifert
@schriftgestalt
Jul 18 2016 09:18
ok
Belleve Invis
@be5invis
Jul 18 2016 09:18
the thing used to build charstring is, well, actually a compiler
Georg Seifert
@schriftgestalt
Jul 18 2016 09:19
so you could write a clang front-end for it ;)
Belleve Invis
@be5invis
Jul 18 2016 09:20
well, I do not think that Clang can be use to build font ;)
but, have you checked out my repo Iosevka?
The code used to calculate the font's outline is written in my own language and compiled to JavaScript.
I wrote a lot of macros to make the script "looked well".
Mac framework... at least should be simpler than win32... you know what, on win32, you have to convert ALL strings into wchar_t* to get a proper Unicode support.
...because the kernel is written in UTF-16
Pertty common for a software written in ealry 1990s.
Georg Seifert
@schriftgestalt
Jul 18 2016 09:26
I think I saw the Iosevka fonts but didn't look at it properly back then. Could you give me a quick walkthrough? How one would set up a basic letter and what option there are on how to influence style (contrast ...)?
It might be interesting to make a Glyphs plugin where you could code some glyphs instead of drawing them. And all others are drawn manually.
Belleve Invis
@be5invis
Jul 18 2016 09:27
Parameters are in <paremeters.toml>, all meaningful parameters have a comment at its side. But for styles, I do not enabled parametrization for all styles, like contrast.
After you save your parameters, just make and wait for the new font being built.
there are instructions on the README.
autobuild... good idea for things like composite glyphs, but for simple glyphs I do not think it is a good idea. Constraint solver may be better.
like Solidworks’ sketching
Georg Seifert
@schriftgestalt
Jul 18 2016 09:31
do you think it would be possible to make a proportional font with it, too?
Belleve Invis
@be5invis
Jul 18 2016 09:31
A proportional Iosevka?
Georg Seifert
@schriftgestalt
Jul 18 2016 09:32
Use the code to set up a proportional font.
Belleve Invis
@be5invis
Jul 18 2016 09:32
Yes, and with auto kerning :)
Georg Seifert
@schriftgestalt
Jul 18 2016 09:33
cool
Belleve Invis
@be5invis
Jul 18 2016 09:33
But you cannot use Iosevka’s code directly
I have a proposal called Wugner
Georg Seifert
@schriftgestalt
Jul 18 2016 09:33
We should definitely try to put that in a Glyphs plugin.
Belleve Invis
@be5invis
Jul 18 2016 09:33
It will have a module to calculate metrics and kerning...
based on LeMo’s model
But Georg, to be honest, this plugin will be REALLY HARD to write.
you need a new language, and a set of libs to calculate outlines.
Iosevka and WUGNER uses libspiro, because maintaining Bezier control points is unplausible
Georg Seifert
@schriftgestalt
Jul 18 2016 09:35
You said you use Javascript? You can use Javascript in Glyphs
Belleve Invis
@be5invis
Jul 18 2016 09:36
Iosevka uses PatEL, a language written by me and cross-compiled to JavaScript
Georg Seifert
@schriftgestalt
Jul 18 2016 09:36
libspiro is not a problem. I have a proper license for it. Or we make the plugin GPL.
Belleve Invis
@be5invis
Jul 18 2016 09:36
It is necessary, because it has macros to make character definitions look better.
Georg Seifert
@schriftgestalt
Jul 18 2016 09:36
What you need to run PatEL?
Belleve Invis
@be5invis
Jul 18 2016 09:37
well, a js environment. I can pack it.
The workflow is:
Georg Seifert
@schriftgestalt
Jul 18 2016 09:37
I have a test plugin that uses webkit to execute any javascript
Belleve Invis
@be5invis
Jul 18 2016 09:38
  1. compile PatEL files into JavaScript using... the compiler written in JavaScript
  1. Run the compiled JavaScript to produce outlines
Adding webkit is unnecessary. v8 itself is enough.
Georg Seifert
@schriftgestalt
Jul 18 2016 09:39
But it is easier to get WebKit to work in an mac app then V8
Belleve Invis
@be5invis
Jul 18 2016 09:41
My purposed code to define a character in Wugner
define-glyph "A"
    encode-to "A"
    rhythm slantleft slantjoin slantright
    add : DiagonalStroke ......
    ......
define-glyph "Aacute"
    encode-to ......
    include : glyph "A"
    include : glyph "acute.case"
Georg Seifert
@schriftgestalt
Jul 18 2016 09:43
how much control do you have? Could you add serifs? Or round corners?
Could it be interesting to get a bezierpath (or whatever suites) as input as build from that? Maybe to make a script font?
Belleve Invis
@be5invis
Jul 18 2016 09:45
well
in Iosevka
there are low-level functions like move-to, line-to and curve-to
and then, spiro-outline
then dispiro to produce a sans-serif stroke, like an O or U
and then high-level components, like HBar.
Georg Seifert
@schriftgestalt
Jul 18 2016 09:46
It might work like subroutines, that you define a stem and then add modifier procedures to them
Belleve Invis
@be5invis
Jul 18 2016 09:47
for serifs and script font, fully possible,
but harder than existing things, because there is not a good library to produce "stroking" in JS
these are JavaScript functions
for example, HBar accepts three or four coordinates and will return a shape containing a rectangle
it is defined like this
define [HBar x1 x2 y sw] : begin
    return [dispiro [widths.centered sw] [corner x1 y] [corner x2 y]]
Georg Seifert
@schriftgestalt
Jul 18 2016 09:53
I’m thinking if you could do shapes like this with a markup that normal people will be able to understand
Belleve Invis
@be5invis
Jul 18 2016 09:55
These things will be provided as a predefined macro :)
so people can directly use them for simple shapes
and if they really need, they can use the things beneath
Georg Seifert
@schriftgestalt
Jul 18 2016 09:57
Would you like to work on getting this to run in Glyphs? How much would you charge for it?
Belleve Invis
@be5invis
Jul 18 2016 09:58
completely OK
actually I think that adding more methods to produce shapes is a good thing
for example, the di-spiros, calligraphic stroke expansions (a trace of an ellipse on a curve), and constraint solver, of cource
constraint solver is something that move the points you drawn to the place they should be
for example Georg, I've seen many designers draw "loops" to preserve lines being parallel after interpolation
if you have a constraint solver, then the problem is solved
simply, add a “parallel” constraint
and activate the solver after interpolation
then every lines will move to the place they should be
Georg Seifert
@schriftgestalt
Jul 18 2016 10:03
There are two things we need to do. 1: take the code we need and make it useable from with Glyphs. 2: Make some fun examples to show what it’s possible and adding/improving it on the way.
Belleve Invis
@be5invis
Jul 18 2016 10:03
i mean, the palces satisify all the constraints
Perhaps I will make some demos in JS :/
like the solver
Georg Seifert
@schriftgestalt
Jul 18 2016 10:05
to 1) The code does not need to produce a full font. But a bezier outline at a time. It gets some global settings and the glyph code and returns an outline.
Belleve Invis
@be5invis
Jul 18 2016 10:06
The code needs some serious math and geometry libraries.
like “get the outline of the border of the zone swept by an ellipse moved along a curve”
Georg Seifert
@schriftgestalt
Jul 18 2016 10:09
But you have all that already?
Belleve Invis
@be5invis
Jul 18 2016 10:09
Nope
I have only “dispiro”, which can be used for sans-serif only
libs to model traditional/calligraphic strokes are MUCH harder than sans-serif
Georg Seifert
@schriftgestalt
Jul 18 2016 10:13
:)
Belleve Invis
@be5invis
Jul 18 2016 10:13
It requires some serious math works
serious geometry and even differential geometry
Georg Seifert
@schriftgestalt
Jul 18 2016 10:14
Could do it? And maybe with it in a 'proper' language?
Belleve Invis
@be5invis
Jul 18 2016 10:14
Georg I think you can investigate existing editors first, like FontForge's
The JS libraries I've been waiting for about one year: bezier boolean, overlap removal and calligraphic stroke expansion.
Georg Seifert
@schriftgestalt
Jul 18 2016 10:16
bezier boolean is available in Glyphs
Belleve Invis
@be5invis
Jul 18 2016 10:16
but not in JS :(
there is no JS lib can do that
and the third one, what i can find are all research papers :(
Georg Seifert
@schriftgestalt
Jul 18 2016 10:17
thats why I suggested a proper language. But I can make any objectiveC code available in Javascript inside Glyphs.
Belleve Invis
@be5invis
Jul 18 2016 10:18
I think you can try to export that thing into a Node.js package.
Georg Seifert
@schriftgestalt
Jul 18 2016 10:19
Im most cases, if you ask a proper mathematician, he will tell you that it is to complicated. But you usually can aproximate it and get fine results
Belleve Invis
@be5invis
Jul 18 2016 10:20
yes, acceptable result, and no broken outlines
for fonts, 0.1u precision is good enough I think
Georg Seifert
@schriftgestalt
Jul 18 2016 10:20
No, I can use the Cocoa ScriptingBridge for that. So JavaScript can call out to native ObjectiveC code.
yes
Belleve Invis
@be5invis
Jul 18 2016 10:23
so, lib 1 and 2 are solved in Glyphs. but the third...
it is necessary for script fonts
and maybe for serif
Georg Seifert
@schriftgestalt
Jul 18 2016 10:25
Could you look into this? Maybe we build a simplified version?
Belleve Invis
@be5invis
Jul 18 2016 10:26
perhaps I will look at the implementation in FontForge
It has a pretty good stroke expander
(afk for dinner)