From 0ef504027457e553caff283bec23af4cd42de981 Mon Sep 17 00:00:00 2001 From: Thomas Churchman Date: Sat, 27 Jul 2024 09:28:16 +0200 Subject: [PATCH] docs(README): add note about font metrics --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 58c1a00..e795785 100644 --- a/README.md +++ b/README.md @@ -122,19 +122,18 @@ The SVG generated by Termsnap makes assumptions about the metrics of the font used for text rendering. Specifically, the font's character advance, line height and descent metrics are used to determine how to lay out the terminal's cells in the generated SVG. The default metrics can be overriden by passing -`--font-` arguments to termsnap. The font is not embedded and the text -not converted to paths. If the client rendering the SVG can't find the -specified font, the SVG may render incorrectly, especially if the metrics of -the font used for rendering vary signficantly from the metrics used to generate -the SVG. - -You can use, e.g., Inkscape to convert the text to paths---the downside is the -text may lose crispness when rendering at low resolutions. You can also convert -the SVG to a raster image. - -You can use the CLI program [font-info](https://github.com/tomcur/font-info) to -determine the metrics of the font you want to use. Alternatively, you can use -the font editor [Fontforge](https://github.com/fontforge/fontforge). +`--font-{advance,line-height,descent}` arguments to Termsnap. You can use the +CLI program [font-info](https://github.com/tomcur/font-info) to determine the +metrics of the font you want to use. Alternatively, you can use the font editor +[Fontforge](https://github.com/fontforge/fontforge). + +The font is not embedded and the text not converted to paths. If the client +rendering the SVG can't find the specified font, the SVG may render +incorrectly, especially if the metrics of the font used for rendering vary +signficantly from the metrics used to generate the SVG. You can use, e.g., +Inkscape to convert the text to paths---the downside is the text may lose +crispness when rendering at low resolutions. You can also convert the SVG to a +raster image. ```bash # Text to path