All Projects → inconvergent → gridfont

inconvergent / gridfont

Licence: MIT License
grid-based system for designing simple symbols and fonts. including an example font. mainly intended for plotter drawings.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to gridfont

baseline
New method for creating leading on the web
Stars: ✭ 31 (-65.93%)
Mutual labels:  font, grid
emojione-color
OpenType-SVG font of EmojiOne 2.3
Stars: ✭ 112 (+23.08%)
Mutual labels:  font
gridd
Flexible grid-based WordPress theme
Stars: ✭ 38 (-58.24%)
Mutual labels:  grid
react-keyview
React components to display the list, table, and grid, without scrolling, use the keyboard keys to navigate through the data
Stars: ✭ 16 (-82.42%)
Mutual labels:  grid
font-v
Font version string reporting and modification library + executable tool
Stars: ✭ 15 (-83.52%)
Mutual labels:  font
vue-gridmultiselect
Simple multi-select component with items displayed in a table like UI
Stars: ✭ 41 (-54.95%)
Mutual labels:  grid
CSS-Grid
CSS Grid 레이아웃 모듈 Level 1
Stars: ✭ 21 (-76.92%)
Mutual labels:  grid
visual-portfolio
Portfolio layouts visual editor with Gutenberg support
Stars: ✭ 31 (-65.93%)
Mutual labels:  grid
chiagen
standalone chia generator
Stars: ✭ 13 (-85.71%)
Mutual labels:  plotter
DBSScouterFont
Scouter Language Font as seen in Dragon Ball Super: Broly
Stars: ✭ 21 (-76.92%)
Mutual labels:  font
hyperglot
Hyperglot: a database and tools for detecting language support in fonts
Stars: ✭ 102 (+12.09%)
Mutual labels:  font
amiri-typewriter
Mono-width companion to Amiri font family
Stars: ✭ 23 (-74.73%)
Mutual labels:  font
dynamic-table
Dynamic Table jQuery Plug-in - A table that can be sorted, filtered and edited, similar to common spreadsheet application.
Stars: ✭ 26 (-71.43%)
Mutual labels:  grid
vue-griddle
⚠️ Deprecated. A Vue.js implementation of @braid/griddle-scss with a toggleable visual overlay to help with your front-end development
Stars: ✭ 11 (-87.91%)
Mutual labels:  grid
VueFlex
A flexbox grid system.
Stars: ✭ 13 (-85.71%)
Mutual labels:  grid
vad-plotter
Plotter for NEXRAD VWP retrievals.
Stars: ✭ 18 (-80.22%)
Mutual labels:  plotter
MSG-Book
📖 现代统计图形(已由人民邮电出版社出版) Modern Statistical Graphics
Stars: ✭ 95 (+4.4%)
Mutual labels:  grid
orthogons
Experimenting with special ratios to guide grids for composition
Stars: ✭ 16 (-82.42%)
Mutual labels:  grid
github-code-font-changer
🎨 Change and customize the boring GitHub code viewer font.
Stars: ✭ 52 (-42.86%)
Mutual labels:  font
FanWunMing
A Simplified-Chinese-to-Traditional-Chinese font based on GenYoMin, which can handle the one-to-many problem | 繁媛明朝是基於源樣明體開發的簡轉繁字型,能處理一簡對多繁
Stars: ✭ 128 (+40.66%)
Mutual labels:  font

Gridfont - Grid-based Font System

original original

smooth smooth

grid-based system for designing simple symbols and fonts. including an example font. Mainly intended for plotter drawings.

The symbol descriptions look like this:

S4,9:DS6|S3DtRqS2eLp

You can use spaces to separate moves, so you can for instance write it like this:

S4,9: DS6| S3 DtRq S2 eLp

The first section (left of :) is the info section. Which currently contains the size of the grid (as integers). Here the width is 4 and the height is 9. That is, there are 4 and 9 grid points in the two directions. That means the width of the symbol will be 3 and 8.

In time this section might contain other things. Such as a translate command. (this might be useful if you are only drawing within a certain section of the grid.)

The next section is one or more paths, separated by the pipe symbol |. Specifically, the above example should result in the two paths of the letter b:

|   <-- p1
|
|/-\   <-- p2
|   |
|   |
|\-/

Here are a few examples of more complex symbol definitions:

asterisk: S3,9:M1,3DS|S3.75Dq1,0.25t1,0.25|M0.25,5Dt0.75,1q0.75,1
w:        S5,9:S2D q1,4 t1,4 q1,4 t1,4
y:        S4,9:S2Dq1.5,4|M3,2De1.5,4e0.5,1e

Paths

When drawing a new path the cursor is always reset to the origin, which is in the upper left corner. The coordinate system is rotated like this:

    -
    |
- --o-- x+
    |
    y+

From there you can perform relative and absolute moves. Once the command D is entered the path will start being drawn. Which means you can move the cursor into position before starting each path.

Relative Moves

The following commands are allowed:

 p   N   t
   \ | /
 L - o - R    <-- o is the current position of the cursor
   / | \
 e   S   q

Any number (see below) after a direction command is interpreted as the length of the step, otherwise the step size is 1. You can also use two numbers separated by a comma. For instance q2.5,3 will move the cursor two and a half steps to the right, and three steps down. Similarly p2,1/2 will move the cursor two steps left, and half a step up.

Numbers

Accepted numbers are either integers: 1, fractions: 1/2 or decimals: 3.5. Note that all decimals are converted to fractions. Decimals are a convenience that allows you to write 4.5 instead of 9/2. However, you are better of using 13/3 instead of 4.33.... The latter will most likely not add up inside the limits of the grid. You can also use multiple commands in the same direction, if you find that easier. For instance R4 R1/2.

That means that if you get out of bounds errors, it is either because you are using a decimal that does not "add up" properly inside the grid. Or simply because the resulting number is outside the grid.

Numbers are converted to float before being exported to json or svg

Absolute Moves

The following absolute moves are allowed

  • Mx,y to move to position x,y relative to the origin.
  • Z move to the first position of the drawn path. (defaults to origin)
  • W to move to move out to the right hand side of the drawing.
  • w to move to the left side of the drawing.
  • H to move to the top of the drawing.
  • h to move to the bottom of the drawing.

Groups

You can provide substitution groups in the groups property of the json specification. Groups names should always start with a ( and end with a ). Any (group) in a path definition will be replaced verbatim until there are no more ( or ) left in the path specification. (Note: this means you can cause infinite loops as well as memory leaks.)

Fonts

The font paths are included in dat/*/res.json, along with SVGs for each symbol. The raw descriptions are in dat/*.json.

At the moment the included fonts are:

  • original: blocky letters
  • smooth: smoother version.

Using the Code

In order to use this library

python3 setup.py install --user

You can then use the library from your code. see gridfont/__init__.py or gridfont/writer.py to get an idea. More documentation might be added later, if this seems useful to people.

To see other options use:

gridfont --help

Parsing your Own Symbol Definitions

To parse a symbol .json file such as dat/font.json run the following, to output the results to the directory out

gridfont parse font.json out [--svg]

If you include the --svg flag, an svg will also be created for each symbol.

Writing

When you have a parsed symbol file (such dat/original/res.json), you can write SVGs with it like this:

gridfont write res.json tmp.svg 'my text'

Contributing

This is a project I started because I wanted a simple "font" that would allow me to easily draw line-based glyphs while plotting. I don't know whether I will end up developing this much further, but I'm open to suggestions.

Todo

  • Improve smooth numerals 2 and 3?
  • Capital letters, at least A-Z
  • shift origin (in info section)?
  • simple pair kerning instructions?
  • some ligatures?

References

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].