Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor as stand-alone rock #38

Merged
merged 27 commits into from
Mar 25, 2023
Merged

Refactor as stand-alone rock #38

merged 27 commits into from
Mar 25, 2023

Conversation

alerque
Copy link
Member

@alerque alerque commented Mar 24, 2023

Closes #37

Not ready for primetime yet, but

$ make install
$ ./lua_modules/bin/fontproof -h
Usage: fontproof [OPTIONS] [--] [SILEARGS]

ARGUMENTS:
  SILEARGS             All remaining args are passed directly to SILE
                       (optional)

OPTIONS:
  -f, --filename=VALUE Specify the font to be tested as a path to a
                       font file
  -F, --family=VALUE   Specify the font to be tested as a family name
  -o, --output=FILE    output file name
  -s, --size=VALUE     Specify the default test font size
  -t, --template=VALUE Use the bundled template by name (full,
                       gutenberg, test, unichar);
  -h, --help           display this help, then exit

@alerque alerque force-pushed the to-luarocks branch 2 times, most recently from 084b149 to 5ce43c7 Compare March 24, 2023 20:57
@alerque alerque marked this pull request as ready for review March 24, 2023 21:00
@alerque alerque force-pushed the to-luarocks branch 3 times, most recently from 8aebd3e to 6fc0439 Compare March 24, 2023 21:18
@alerque
Copy link
Member Author

alerque commented Mar 24, 2023

Testing against old versions of SILE might be pretty tricky. We'd probably have to checkout and build the sources for them directly. I might ditch that and just test on the latest to get v2 of this project spun up with a clear path to iterating on small improvements from there. The v2 series will not be compatible with very old versions anyway, basically you'll need at least v0.14.0 just to play and there isn't much point in not running the latest patches on top of that, so this probably wont' be much of a loss until v0.15.0 comes out.

@alerque
Copy link
Member Author

alerque commented Mar 25, 2023

I'll probably move ahead with this and work on getting all the moving parts in place for a v2 release to LuaRocks.org. Anybody currently using this is almost certainly doing so with old packages and and old SILE to match. Anybody coming along right now and trying to match it to a new SILE is just going to find everything broken. And on top of that nobody else can iterate on smaller improvements like templates and commands without the overall project layout being fixed up. Even if v2.0.0 isn't perfect it should give a working tool that people can easily improve and contribute to again. Having this on master and even tagged as a release won't break anything for anybody that isn't already broken through age and missmatched versions.

@alerque alerque merged commit 687f180 into master Mar 25, 2023
@alerque alerque deleted the to-luarocks branch March 25, 2023 19:41
@alerque
Copy link
Member Author

alerque commented Mar 25, 2023

For testing even prior to v2.0.0 tagging, the Docker image for this should be available as the HEAD build now:

$ docker pull ghcr.io/sile-typesetter/fontproof:master
$ alias 

And also the dev rockspec is available on LuaRocks:

$ luarocks install fontproof dev-1

@n7s
Copy link
Contributor

n7s commented Mar 30, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Help with fontproof API changes and long-term maintainership
2 participants