Comments (6)
http://lists.gnu.org/archive/html/lilypond-user/2018-01/msg00321.html
It seems it's not that easy. The problem is to get the font family name out of Lua.
See also https://tex.stackexchange.com/questions/410992/how-can-i-retrieve-the-current-roman-sans-and-mono-fonts-in-luatex
from lyluatex.
The luatex list is [email protected]. You can join here: https://www.tug.org/mailman/listinfo/luatex
from lyluatex.
I have achieved a first step: determining the current font family. The commit referenced above simply applies this current text font to all three fonts in LilyPond, which of course can't be the end of the line.
One challenge to take is to retrieve the three family names for \rmfamily
, \sffamily
and \ttfamily
.
Then there has to be a discussion about the behaviour:
a)
I suggest not to bother making this an option. First I can see little reason why one would not want the text fonts to match, and second it is easy to do so anyway: If the LilyPond code defines text fonts this will happen after our code and take precedence.
b)
What should be the behaviour if the current font is not the one specified by \rmfamily
?
- ignore that fact and still apply the three fonts (so the main font in the score is the roman font?
- apply the current font as the roman font (regardless of what it is) but use the defined sans and typewriter fonts as they are specified. This may result in scores to have both main and sans text to be in the same sans font.
from lyluatex.
a) Agreed.
b) Here an option might be in order. Perhaps defining \lyluatex@rmfamily
etc. which default to \rmfamily
etc. (thus using your first suggestion as the default) and then providing an interface that allows the user to redefine these commands to specify which font specs will be passed to LilyPond in each of those positions (allowing a user to change the behavior if they want the second).
from lyluatex.
Note to self: maybe we have to include the font names in the output
hash too. A score that is used twice in the same document, but with different fonts will currently not be compiled twice.
from lyluatex.
Note to self:
Implemented in 5e6d67f0
from lyluatex.
Related Issues (20)
- \setmainfont causes problems HOT 6
- The score doesn't contain any music HOT 5
- MiKTeX with LilyPond 2.24: blank scores
- attempt to index a nil value ( field 'metadata') HOT 5
- lyluatex runs slowly on mac HOT 8
- Includepaths no longer working HOT 3
- Reuse precompiled files in different document HOT 3
- Some weird alignment issues when using a custom header HOT 3
- TexLive can't find Lilypond anymore HOT 5
- Make lyluatex work with LilyPond 2.25.4 and newer HOT 2
- Make lyluatex process LilyPond snippets in parallel HOT 6
- Error in lilypond-Log: "/bin/sh: 1: Syntax error: Unterminated quoted string" HOT 4
- Print copyright and tagline below song
- Suppress bar numbers HOT 2
- Large left padding with inline inserts HOT 5
- Can't compile on MacOS - bad argument #1 to 'rawget'
- Make lyluatex work with LilyPond v2.25.5 and newer
- Found something incompatible with `fragment` HOT 4
- Compilation fails when using `--output-dir=build` option
- included score is not horizontally centered. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lyluatex.