sile-typesetter / fontproof Goto Github PK
View Code? Open in Web Editor NEWA font design testing class and CLI tool for SILE
License: MIT License
A font design testing class and CLI tool for SILE
License: MIT License
Since the SILE 0.10.1 update \gutenberg is producing warnings, even though the PDF seems fine.
sile fpGutenberg.sil
This is SILE v0.10.1
<fpGutenberg.sil>
Downloading Declaration of Faith, in Latin and the Original Greek... Done
?…" near fpGutenberg.sil:4:1: in \gutenbergtable: 0x7fb9df0d59b0 after in \paravailable at in "
?…" near fpGutenberg.sil:4:1: in \gutenbergtable: 0x7fb9df0d59b0 after in \par
[1]
?…" near fpGutenberg.sil:4:1: in \gutenbergtable: 0x7fb9df0d59b0 after in \paravailable at in "
?…" near fpGutenberg.sil:4:1: in \gutenbergtable: 0x7fb9df0d59b0 after in \par
[2]
! Underfull frame: 11.8329126455pt stretchiness required to fill but only 0pt available at fpGutenberg.sil: in <file> (\) after in \par
! Overfull content for frame runningHead at fpGutenberg.sil: in <file> (\) after in \par
[3]
Due to Arch Linux updating to Lua 5.4.3 per this bug: lunarmodules/luasocket#331
I need sleep before I can think of a solution, but I figured I'd at least document that I found the problem.
Looks like the ssl connection to the external website providing the pi numbers is not happy:
"Could not read pi from https://uploadbeta.com/api/pi/?n=104: sslv3 alert handshake failure at proof.sil:17:1: in \pitable: 0x559697c9db20"
Extracted from @n7s's comment:
With the new 2.0.1-1 version installed (as verified in
/usr/local/bin/fontproof targettting version 5.2 of lua as AFAICT the Ubuntu
package pulls in a version of sile targetting version 5.2) I get a new error:[builder@smith-jammy] 🌱 master origin/master (b836aba) +/- ? ⬢ [Docker] /smith/font-andika-mtihani/results 🐳 🍏 ❯ fontproof --filename="AndikaMtihani-Regular.ttf" ../tests/Latin.sil SILE v0.14.8 (Lua 5.2) <../tests/Latin.sil> as sil ! Attempted to get an undeclared class option 'weight' at ../tests/Latin.sil: in \font near 3:1: in \setTestFont[features="+clig,+kern",papersize="a4",size="18pt"] error summary: Processing at: ../tests/Latin.sil: in \font near 3:1: in \setTestFont[features="+clig,+kern",papersize="a4",size="18pt"] Using code at: /usr/share/sile/classes/base.lua:34: Attempted to get an undeclared class option 'weight' Run with --traceback for more detailed trace leading up to errors.
It looks like \setTestFont parameters are the issue. How would I debug this
further? (not getting a backtrace with --traceback). A project like Gentium
has more .sil files for further testing.
Jonathan has just open-sourced his (Latin) proof texts: https://github.com/hoeflerco/proofs
They should be added as a proofing command.
\pattern
calls \proof
like so:
SILE.Commands["proof"]({size=10,type="pattern"}, {para})
What if I want a bigger hobonop?
Docker Hub as recently gone the way of Travis CI and severely restricted what they offer FOSS projects. One of the major restrictions is that they won't automatically build from hooks any more.
This project needs some overhaul in light of that
Extracted from comment here:
After installing the rock I'm able to test the new fontproof on some font existing font projects.
Looks like when a .sil test file (which we tend to keep under tests/example.sil in various font project repositories) has something like
\setTestFont[features="+clig,+kern",size="18pt"]
I get this error:Using code at: /usr/local/share/lua/5.2/sile/classes/fontproof/init.lua:127: attempt to concatenate field 'family' (a nil value)
Other test files give me errors like:
Failed to load any working font manager
orUsing code at: /usr/share/sile/outputters/libtexpdf.lua:30: attempt to index field 'paperSize' (a nil value)
What am I missing? What am I doing wrong? I'm just trying
fontproof tests/document.sil -f "./results/font-file.ttf -o results/example-result.pdf
It would be ideal to be able to reuse existing .sil documents which have
\setTestFont[params]
and not to have to change them all.How do I set the family field or the font manager? Isn't the papersize field already defined in the package?
One simple example is https://github.com/silnrsi/font-andika-mtihani/blob/master/tests/Latin.sil
Thank you for any insights and tips.
Also I'm quite happy if fontproof just becomes an in-tree package/class and is bundled inside SILE itself. IMHO there is no big need for it to be a standalone package.
Çok teşekkür ederim!
This might well be very obvious but anyway here goes:
A small regression has been flagged up by our CI:
this is confirmed to work with sile v0.10.9:
escaping % with a backslash in punctuation patterns where we want the special character to appear as is.
but it does not work anymore with sile v0.10.10:
Error detected:
fontproof.lua:259: invalid use of '%' in replacement string
What has overriden the escaping of special characters?
A basic syntax issue we have overlooked?
Any pointers?
SU.utf8char() was deprecated in SILE v0.11.0. Please use luautf8.char() instead.
I'm pretty sure (but haven't actually tested) that this class is going to break in SILE v0.10.11 (released yesterday). I say that because I recognize this bit:
...working outside of the init()
function is a loophole that I closed to address another issue. It probably never should have worked this way, but it's now stricter about class instantiation actually happening in the callback function (and hence in the correct sequence with class inheritance and other package initialization). Some of my own projects ran afoul of this too.
(Feel free to assign this issue to me, I'll submit a fix when I get a chance.)
When using Font Proof with \unicharchart[type=all]
or \unicharchart[type="all",columns="12",rows="16"]
an error is generated
/usr/share/sile/languages/unicode.lua:157: Word break parser failure: U_INVALID_CHAR_FOUND
This line looks like it was added two years ago. Using \unicharchart[type=range, ...]
works. Any idea @alerque ? My group is not using type=all
(well, of course not, since it does not seem to work) but might if it works. However, nothing is being blocked so this is a low priority for us. Looks like it has been broken for a while, since the test file for this has the type=all
test commented out.
looks like \setFontOptions also needs to accept the class option language:
See this Padauk test document for example:
! Attempted to set an undeclared class option 'language' at /smith/font-padauk/tests/issues.sil:23:1: in \setTestFont[features="+clig,+kern",language="dflt",papersize="a4"]
error summary:
Processing at: /smith/font-padauk/tests/issues.sil:23:1: in \setTestFont[features="+clig,+kern",language="dflt",papersize="a4"]
Using code at: /usr/share/sile/classes/base.lua:22: Attempted to set an undeclared class option 'language'
on SILE v0.14.9 (Lua 5.2) FontProof installed from rockspec 2.0.4-1
Thanks!
Hi Caleb,
I've been trying to get fontproof to follow the recent API changes but I'm now stuck with how new packages are designed to work.
Victor - the original author - isn't able to dedicate time to this, so we think it would be great if you could take a look and if fontproof just became one of the packages/classes who are part of sile rather than a separate project. You are most definitely the best person to keep up with the API changes so fontproof can continue working as expected. Thank you for considering it.
Other fontproof related issues: sile-typesetter/sile#722 and sile-typesetter/sile#797
Thanks!
I really like this tool and managed to produce something pretty decent after learning the ropes. But I have a request for the \unicharchart:
If the top "header" row contains no variation at all, then it should be suppressed.
So here, it is welcome, and useful:
But here it isn't useful or needed at all.
If it doesn't automatically suppress itself, then could there be a parameter to manually choose when to suppress it? Thanks for considering this improvement.
Per undone todo items in the latest SILE release checklist: sile-typesetter/sile#1247
This may affect #28.
Error:
! Unimplemented, creating hbox node from zerohbox at:
fpUnichar.sil: in \fonttable: 0x7fa74cc3bc00 near 7:1: in \unicharcharttable: 0x7fa74b1156a0
fpUnichar.sil:7:1: in \unicharcharttable: 0x7fa74b1156a0
stack traceback:
/usr/local/Cellar/sile/0.10.0/share/sile/core/utilities.lua:28: in function 'core/utilities.error'
...local/Cellar/sile/0.10.0/share/sile/core/nodefactory.lua:47: in field '_init'
...ar/sile/0.10.0/libexec/vendor/share/lua/5.3/pl/class.lua:35: in upvalue 'call_ctor'
...ar/sile/0.10.0/libexec/vendor/share/lua/5.3/pl/class.lua:164: in field 'hbox'
.../local/Cellar/sile/0.10.0/share/sile/core/typesetter.lua:171: in method 'pushHbox'
./classes/fontproof.lua:420: in function <./classes/fontproof.lua:408>
(...tail calls...)
/usr/local/Cellar/sile/0.10.0/share/sile/core/font.lua:46: in field '?'
/usr/local/Cellar/sile/0.10.0/share/sile/core/sile.lua:284: in function 'core/sile.call'
./classes/fontproof.lua:408: in field '?'
/usr/local/Cellar/sile/0.10.0/share/sile/core/sile.lua:284: in function 'core/sile.call'
...cal/Cellar/sile/0.10.0/share/sile/core/inputs-common.lua:63: in function 'core/sile.process'
...al/Cellar/sile/0.10.0/share/sile/core/inputs-texlike.lua:164: in field 'process'
/usr/local/Cellar/sile/0.10.0/share/sile/core/sile.lua:237: in function 'core/sile.readFile'
/usr/local/Cellar/sile/0.10.0/libexec/bin/sile:62: in function </usr/local/Cellar/sile/0.10.0/libexec/bin/sile:62>
[C]: in function 'xpcall'
/usr/local/Cellar/sile/0.10.0/libexec/bin/sile:62: in main chunk
[C]: in ?
For some reason the container builds of this repo are cross wired and GitHub is linking them back to the sile repo sources.
https://github.com/sile-typesetter/fontproof/pkgs/container/fontproof
Also it's marked as private, and I can't find the switch for that. It is unlikely that the recommended systax for using FontProof as a GitHub action will work right until this is fixed.
We have found that proofing a few numerals is a little bit of a challenge. When we check how numbers behave with special characters like % we can simply escape it like \%
but for $ the best I have come up with is {\\$}
inside another \proof{ larger text with numbers }
. There must be a better way, what am I missing? thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.