vibesketch.render.fonts

The reviewed Roboto font shared by publication SVG, PNG and PDF.

Functions

advance(text)

The width of one line of text in the publication font, in ems.

check_text(svg)

embed_font(svg)

Make SVG annotations portable without relying on the viewer's fonts.

vibesketch.render.fonts.advance(text)[source]

The width of one line of text in the publication font, in ems.

Advance widths only, without kerning; a character the font lacks counts as a full em, as the renderer’s own bounds do.

Parameters:

text (str)

Return type:

float

vibesketch.render.fonts.check_text(svg)[source]
Parameters:

svg (bytes)

Return type:

None

vibesketch.render.fonts.embed_font(svg)[source]

Make SVG annotations portable without relying on the viewer’s fonts.

Parameters:

svg (bytes)

Return type:

bytes