Giter Club home page Giter Club logo

Comments (6)

uliska avatar uliska commented on June 15, 2024

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.

rpspringuel avatar rpspringuel commented on June 15, 2024

The luatex list is [email protected]. You can join here: https://www.tug.org/mailman/listinfo/luatex

from lyluatex.

uliska avatar uliska commented on June 15, 2024

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.

rpspringuel avatar rpspringuel commented on June 15, 2024

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.

uliska avatar uliska commented on June 15, 2024

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.

uliska avatar uliska commented on June 15, 2024

Note to self:

Implemented in 5e6d67f0

from lyluatex.

Related Issues (20)

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.