|
From: | Alexander Kobel |
Subject: | Re: Changing how a font style is requested |
Date: | Tue, 15 Jul 2014 10:29:51 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 |
Hi all,since I could not find anything suitable to solve the issue described below, I decided to write a little patch. Please have a look at
https://codereview.appspot.com/108700043 and tell me what you think about it.[ BTW: This might or might not be entirely orthogonal to the music font selection methods which are debated about currently, in the sense that the feta font loader is hard-coded and built-in into make-pango-font-tree and the proposed make-expert-font-tree. Sorry, I did not follow those discussions in detail; but if you think that's a good time to integrate music font selection as well, please go ahead. ]
I could not see a way to achieve what I need in user-level Scheme, since add-font is not exposed publicly (and probably for a good reason). I'm happy to take comments on functionality and coding style; I will write a bit of documentation in addition to the regtest once (if?) you deem the interface acceptable.
I hope goals and syntax are somewhat self-explaining; otherwise, feel free to ask for further explanations. I barely added syntactic sugar (except the default font scale 1.0), but I'm willing to reconsider the input syntax to make-expert-font-tree if you have any better ideas. However, a front-end to it should be much more easy to write, and this is doable in user-level code.
Thanks in advance, Alexander On 07/11/2014 11:59 AM, Alexander Kobel wrote:
Dear all, I like to use the Romande ADF font family [1] in one of my scores. I do the usual rule-of-three with \paper { ... (make-pango-font-tree "Romande ADF No2 Std" "Romande ADF Std" "monospace" (/ myStaffSize 20)) ... } (If you wonder, No2 is condensed, and the non-condensed version, used in the headers, is mapped to sans for easy access.) However, here's the catch: Romande does offer a bold variant, but it announces it as "DemiBold" instead of "Bold", according to fc-list. I know that I can switch to the different font each time I need bold, but that's an utter nuisance. Is there any way to tell Lily how to choose a bold variant? Bonus points if it only applies to a specific, say, the serif font. Or, <wishlist to follow>, if it is possible to define a mapping similar to myserif = { regular: # default "Romande ADF No2 Std:style=Regular", bold: # choose way of selecting bold "Romande ADF No2 Std:style=DemiBold", italic: # pretend I don't like Romande's italics # and need to scale some other font to match "Gentium:style=Italic:scaling=0.93", bold-italic: # use small caps family instead "Romande ADF Style Std:style=Regular" } ... \paper { #(define fonts (myserif mysans mymono (/ myStaffSize 20)) } Obviously, that's not Lily's syntax, but you get the point... Thanks in advance, Alexander [1] http://arkandis.tuxfamily.org/adffonts.html _______________________________________________ lilypond-user mailing list address@hidden https://lists.gnu.org/mailman/listinfo/lilypond-user
[Prev in Thread] | Current Thread | [Next in Thread] |