Closed tajmone closed 3 years ago
@SicroAtGit, do you think we should include in the repository the actual binary fonts (TTF) that were used for the diagrams, or should we just provide a link to them at Google Fonts?
The rationale for including them would be ensuring same font version, just to avoid diff noise in the generated SVG diagrams (since the glyphs are converted to SVG shapes by Cairo-SVG).
The rational against it would be that in case of updated fonts versions, future maintainers should rebuild all diagrams using the latest font anyhow (i.e. assume that updated fonts are better).
Although the font files are not huge, I'm still undecided on whether we should include them or not. These fonts are both well known, not some obscure fancy font by an individual, so chances are that they'll always be available in the future (even if not at Google Fonts).
The exact dia executable version is currently also downloaded from a batch file on Windows and has not been added to the repository. Because of this and because the fonts are also published on GitHub, it should be sufficiently safe to just provide a link to the exact version of each used font.
Here are the permanent URLs to the latest fonts in the regular version for example:
Because of this and because the fonts are also published on GitHub, it should be sufficiently safe to just provide a link to the exact version of each used font.
Good point! I didn't consider that the source repositories of these fonts might include the generated TTF files — I thought they'd contain only the project files of the tools they're designed with.
Well then there's no point burdening the repository with these binaries, we'll just point to the blorbs of the current version, and if the need ever be .... future maintainers can just rebuild everything with the latest versions.
Now that we've shifted to using Dia 0.97.3 and the Cairo-SVG format (see #12), we are free to chose which fonts to use in the diagrams, for Cairo SVG converts all text to SVG shapes, freeing SVG images from fonts-dependencies.
The source Dia projects use the generic font name "monospace", which falls back to whichever default monospace font the system is set to use (most likely, "Courier" or "Courier New"). But this is not a strong guarantee to ensure that different contributors (working on different machines) will actually be able to generate the same identical diagrams, for they might have slightly different fonts matching "monospace".
We should therefore:
Include the TTF fonts (and their license) in the repository (in theassets_src/fonts/
directory).Inconsolata-Regular.ttf
OpenSans-Regular.ttf
OpenSans-Bold.ttf
OpenSans-Italic.ttf
This will ensure that anyone editing the diagrams will be able to produce same result, as well as allowing us to choose some nicer fonts.
It will require to edit all the diagrams again, though, since changing fonts might require to realign all the diagrams' elements due to differences in the glyphs proportions. And it will force us to rebuild most diagrams, using the flowchart elements (which allow text to be part of the box elements, whereas the current Dia projects use separate elements).
Although this is going to be rather time-consuming, it might be worth the effort for it will enhance the final quality of the diagrams, and might come handy for future editions too (e.g. in other languages).