\@@_declare_shapes_smcaps:nn setup a slsc -> itsc substitution#425
\@@_declare_shapes_smcaps:nn setup a slsc -> itsc substitution#425DamienRobert wants to merge 2 commits intolatex3:developfrom
slsc -> itsc substitution#425Conversation
|
For instance here is my |
The substitution was missing a `\@@_combo_sc_shape:n` This would mean that a `bx/scit` would be substituted to `b/it` rather than to `b/scit`.
|
I just pushed a new version that also set up a |
|
Thanks! Code changes looks great so far. I can't look into detail right now but will merge once I've wrapped my head around a test file. Before I take a look, does it make sense to you that |
|
It depends on the LaTeX version. From version 2020-02, LaTeX has a new fontaxe like feature, where we can combine several shapes and setup fallbacks. For your example, the When we directly ask for a This could be corrected directly at the latex level by adding suitable In versions prior to Note that there is a similar fallback to 'b' for the 'bx' series: And a |
|
Now it gets tricky. With the current way fontspec does things, it processes custom When fontspec set up a face, it also set up the For instance in my because that is also what But since the Indeed, patching There are two solutions:
|
|
Now here are a few more tricky situations:
|
If a slanted font is not provided, fontspec setup automatic sl -> it substitutions in \@@_declare_shape_slanted:nn. But if a small caps font was provided, an scit shape is defined but there is no corresponding scsl -> scit substitution. Fix this by adapting the code of \@@_declare_shapes_smcaps:nn into \@@_declare_shape_slanted:nn. Use a similar fix in \@@_declare_shapes_bx:nn for the bx/scsl -> bx/scit substitution.
|
(The new push simply correct the commit message, I was using |
|
A few last thoughts on this subject of
So unfortunately I don't see any easy solution to solve all corner cases. What I currently do is patch |
|
Thanks much for all the careful work here. FWIW I am more than happy that any new code in fontspec assumes a 2020 version of LaTeX. I’m in the middle of a busy period at work but I hope I can look at this code sometime soon...
|
|
Ok, so if we are allowed to assume LaTeX 2020, then my feeling is that the best would simply to remove In this case this pull-request that correct some bugs for both these functions is no longer needed ;) I am happy to provide another pull request that does this if you agree. As I argued (too lengthy) above, this is not the perfect solution but imho the least worse one. Maybe you have better ideas than me! Anyway there is no hurry, meanwhile I am happy with simply patching fontspec in |
If a slanted font is not provided, fontspec setup automatic
sl -> itsubstitutions in
\@@_declare_shape_slanted:nn. But if a small capsfont was provided, an
itscshape is defined but there is nocorresponding
slsc -> itscsubstitution.Fix this by adapting the code of
\@@_declare_shape_slanted:nninto\@@_declare_shapes_smcaps:nn.Status
FOR DISCUSSION (but should be ready)
Todos
(Did a manual test)
(Added developer documentation)
Minimal example demonstrating the new/fixed functionality