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

Provide more vector fonts #8

Open
jserv opened this issue Jul 17, 2024 · 5 comments
Open

Provide more vector fonts #8

jserv opened this issue Jul 17, 2024 · 5 comments

Comments

@jserv
Copy link
Contributor

jserv commented Jul 17, 2024

The glyphs originated from Hershey vector fonts and fitted curved portions with splines. The only font family in Mado is Roman, but it is possible to convert existing open TrueType fonts to the internal representations. Alternatively, we can provide a TrueType font loader for diverse glyph rendering.

Hershey vector fonts were developed by Dr. A. V. Hershey in the 1960s while he was at the Naval Weapons Laboratory. These fonts were designed for use in vector-based computer displays and printers and were remarkably advanced for their time. They feature thousands of glyphs, including special characters, mathematical symbols, musical notation, and more. In addition to their beauty, the fonts include per-character side bearings, and even a script font with ligatures is available.

Reference:

@jserv
Copy link
Contributor Author

jserv commented Jul 28, 2024

TwinScript was originally prepared in 2011 and converted to SVG fonts in 2019 by Windell H. Oskay. The contents were adapted from Hershey Fonts in SVG by Marty McGuire. It is part of gcode-text.

image

@Urbaner3
Copy link

Urbaner3 commented Jul 29, 2024

Based on ttf tools in the directory, which is ./tools/ttf/twin-ttf.c, can I say that
the work is to choose some fonts and provide the algorithm as twin to render it. Or
is it just to render with libschrift which is already functional in the project?

I would gather more information on font, such as font family, depth, width, font face, etc. Source.

@jserv
Copy link
Contributor Author

jserv commented Jul 29, 2024

Based on ttf tools in the directory, which is tools/ttf/twin-ttf.c, can I say that the work is to choose some fonts and provide the algorithm as twin to render it. Or is it just to render with libschrift which is already functional in the project?

TWIN represents glyphs as stroke data. By recording only the pen's path, the data required to represent each glyph is minimized. The tools/ttf utility converts TrueType fonts to the internal spline-based scalable font representation. You can either 1) convert and edit existing TrueType fonts or 2) implement a TrueType font loader using libschrift or similar libraries.

Check the paper: https://keithp.com/~keithp/talks/twin-ols2005/twin-ols2005www/

@jserv
Copy link
Contributor Author

jserv commented Aug 26, 2024

The chinese-hershey-font project converts Chinese characters into single-line fonts using computer vision techniques. Single-line fonts, like Hershey fonts, are invaluable for creating engaging procedural graphics and for engraving applications. They may also offer advantages in machine learning, potentially being easier for neural networks to process. This tool automates the generation of Chinese single-line fonts from standard TrueType Font files (ttf/ttc). It offers output options in either the traditional Hershey format or as a JSON file containing polyline data. The underlying algorithm works by analyzing a raster image of each character from multiple angles. It identifies line segments that are likely to be part of character strokes. The process then estimates the complete strokes by linking, combining, and refining these line segments.

ttf2hershey converts True Type Fonts (.ttf) to Hershey vector fonts.

See also: Herhey fonts are single line based vector fonts, LibreCAD's LFF.

@jserv
Copy link
Contributor Author

jserv commented Sep 5, 2024

bdf2sfd is a BDF to SFD converter, allowing to vectorize bitmap fonts. It works by converting each pixel of a glyph to a polygon, which produces large and unoptimized SFD files that should be post-processed using FontForge.

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