Giter Site home page Giter Site logo

fontproof's People

Contributors

alerque avatar devosb avatar jvgaultney avatar mhosken avatar n7s avatar simoncozens avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fontproof's Issues

\gutenberg[] results in confusing warning messages

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] 

Using \setTestFont with weight parameter crashes class

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.

\pattern size is hardcoded

\pattern calls \proof like so:

SILE.Commands["proof"]({size=10,type="pattern"}, {para})

What if I want a bigger hobonop?

Redo Docker release procedure

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

  • Build and release on GitHub Container Registry by default
  • Add an easy way to manually push those images to Docker Hub
  • Update base SILE container to latest version, and probably pull from GHCR
  • Fix GH Action to run from GHCR releases

Cannot specify font properties in template but font from CLI options

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 or Using 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!

Character escape regression with v0.10.10

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?

API changes

SU.utf8char() was deprecated in SILE v0.11.0. Please use luautf8.char() instead.

Update class to work with SILE v0.10.11

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:

https://github.com/silnrsi/fontproof/blob/28247947e565351f3cbb794fdf68693dc8ded4f9/classes/fontproof.lua#L15-L26

...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.)

No range version of unicharchart does not work

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.

\setFontOptions class option issue

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!

Help with fontproof API changes and long-term maintainership

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!

Possible to hide \unicharchart header row?

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:
image

But here it isn't useful or needed at all.
image

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.

\unicharchart is broken in SILE 0.10.0

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 ?

Workaround for proofing certain reserved characters and escaping them properly?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.