Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design Decisions #7

Open
VivaRado opened this issue Oct 16, 2022 · 6 comments
Open

Design Decisions #7

VivaRado opened this issue Oct 16, 2022 · 6 comments

Comments

@VivaRado
Copy link
Owner

VivaRado commented Oct 16, 2022

@ctrlcctrlv of MFEK pointed out, the similarities of SYFF with MetaFont and MetaPost, that able through a specially designed syntax of drawing and creating graphics using PostScript, PostScript to MetaPost compared to CSS to SYFF means we will have to come up with the things we would like to see SYFF be able to do.

Keep in mind that SYFF has to be embeddable in font editors that already exist, just like Xpresso in C4D or like Grasshopper in Rhino, but keeping things non intrusive against the font editor (more on that later), or even able to leverage the font editors API.

For the time being we are keeping things as simple as possible, the example bellow draws a circle-plus


Here's an example from file /usr/share/texlive/texmf-dist/fonts/source/public/cm/sym.mf on my system:

iff known o_plus: cmchar "Circle-plus operator";
beginarithchar(o_plus); pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
circle_points; draw_circle;  % circle
draw z2--z6; draw z4--z8;  % bar and stem
labels(1,2,3,4,5,6,7,8); endchar;

If I run...

mpost '&mfplain' "\\mode:=localfont; mag := 20.0; outputtemplate := \"%j-%c.svg\"; outputformat := \"svg\"; input /usr/share/texlive/texmf-dist/fonts/source/public/cm/cmsy10.mf;"

cmsy10-8.svg

cmsy10-8

Originally posted by @ctrlcctrlv in #6 (comment)


Here is how PostScript would draw a circle

     4 5 3 0 360 arc closepath
     stroke
     
/* place at (4,5) with a radius of 3, draw arc 360*/

In CSS syntax, ehm... SYFF syntax...

Ο {
     pivot: 4 5;
     radius: 3;
     arc: 0 360;
}

/* place at (4,5) with a radius of 3, draw arc from 0 to 360 (0 redundant) */

image
Circle A

Here is what we can see from drawing a circle with CSS.

.circle {
     height: 50px;
     width: 50px;
     border-radius: 50%;
}

That we draw a square, and then we make it rounded.

image
Circle B

Then we can add more points to the circle and keep the ability to round them?

Ο {
     pivot: 4 5;
     radius: 3;
     arc: 0 360;
     segment: 4;
     border-radius: 80%;
     /* Imagine if we said constraint: false = wonky circle just in case */
}

/* place at (4,5) with a radius of 3, draw arc from 0 to 360 (0 redundant) with 4 segments, essentially a square in terms of points, but with 100% rounded */

image
Circle C

With parallel constraint ( call them cubic constrained IDK ) we get to draw circles with less points, 4 anchors instead of 8 and if we remove the inner controls, an equal amount of controls, so why have more points but the same shape, well beats me...

But lets go on and ask for 3 points...

image
Circle D

and two points...

image
Circle E

and one point.
image
Circle F 🤣

Then control points to infinity are equal to parallel constraint, don't ask me in what space. Because pivot pulls the line in, based on border-radius value.

How many points do I need on a circle, not how many points the machine needs to designate a circle.

image
got em!

@VivaRado
Copy link
Owner Author

VivaRado commented Oct 16, 2022

What if constraints could accept formulas?

image
Formula A

@VivaRado
Copy link
Owner Author

What if parallel constraint was not boolean?

image
Circle G

@VivaRado VivaRado changed the title MetaFont, MetaPost similarities and doing stuff with CSS like Flavour. Design Decisions Nov 17, 2022
@VivaRado
Copy link
Owner Author

We clearly understand strokes, for the controlled shape they are sub par as they are a precursor. We know for a fact there are many corrections needed to resolve stroke deliberations.

Everything (sometimes) starts with paths and outlines, but at some point designers start flattening and using the shapes. That part of the process is too fuzzy, unless you literally come up with a different representation of path editing, that meets consensus.

Additionally to this there are techniques like masking the stroke path extensions, adding end shapes and assuming all that blends well at the seams because variable fonts need homogeneity in path order, so you can also forget wild stuff like brush looking letters for now.

But most of the things needed for font design, are not design. They are plumbing, components, letter repetitions and THAT is what takes years. So THAT we want to solve with SYFF, because it's the easy problem and the biggest burden to the type designer at the same time.

If we end up solving design issues and come up with a different path representation that takes care of careful seam joining and path management. Take a look at Solidworks and parametric design in general. They accompany the shapes with dimensions and measurements.

You change the dimension it changes the underlying shape. This is how strokes should work, and they should take care of all the baggage they come with. That's why we need outside the box thinking and not be stuck at recreating components of proprietary software.

But anyone who worked with parametric knows that it needs careful setup or a lot of things just don't work or fail to compute like applying bevels to complicated boolean seams. But we are 1D less, and a lot can be fixed when you don't worry about one more dimension.

For SYFF at the moment, we will stick at doing the plumbing and solve the 3 out of 4 years it takes to design a font and assume you already know your ABCs and how to draw shapes, then maybe we will be nosy and bother you with telling you how to draw your shapes...

@ctrlcctrlv
Copy link

The first principle is wrong so the rest of what follows is too; at no point do the largest and best free software variable fonts (quæ sunt METAFONT fonts) go from strokes to filled paths, as if they were to do so, and apply discrete changes to those resulting paths, the changes could not be applied across the family as a whole.

@VivaRado
Copy link
Owner Author

VivaRado commented Nov 18, 2022

The stroke to fill goes for the design process, some designers implement, I am speaking about "outline stroke" command. In the mean time we have a concept solution of stroke management that gives decent control for variation of thickness, and allows for variation of sherif design and placement. In addition to that we have a concept for stroke parametric design without discrete coordinates that handles curvilinear and straight line interceptions in one algorithm. All that conceptual but pretty much ended up by gradual simple mechanical functions.

@VivaRado
Copy link
Owner Author

VivaRado commented Nov 24, 2022

A preview of SYFF Profiler. Not a priority.
SYFF_node_editor_001_003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants