music-encoding icon indicating copy to clipboard operation
music-encoding copied to clipboard

deprecate fontname

Open kepper opened this issue 4 years ago • 4 comments

As @th-we pointed out in https://github.com/music-encoding/music-encoding/pull/704#issue-469038961, we still do have both @fontfam and @fontname. The latter is a very old artifact, and there is no corresponding attribute / value in TEI or CSS. Both are defined in the same attribute class att.typography, which means they are always available in the same spaces. There seems absolutely no reason to preserve both, and I recommend to go with @fontfam, and drop @fontname. Taking this out will change "forward compatibility", but an automatic conversion seems easy, so that shouldn't be an issue.

kepper avatar Oct 15 '20 11:10 kepper

@kepper Shouldn't we remove @fontname and data.FONTNAME entirely? They are not only used by att.typography (which your commit handles), but also by att.lyricStyle and att.textStyle.

th-we avatar Oct 15 '20 11:10 th-we

yes, we should. However, I just noticed that some examples use @fontname, namely tempo-01.mei (and there might be others…).

kepper avatar Oct 15 '20 16:10 kepper

However, I just noticed that some examples use @fontname, namely tempo-01.mei (and there might be others…).

@fontname has been used because, as far as I know, there is no way to indicate that a SMuFL compliant font should be used. I don't think that fontfam="smufl" would be correct.

lpugin avatar Jan 27 '22 15:01 lpugin

@lpugin and I discussed this earlier; would it be feasible to provide CSS-like fallbacks, e.g., fontfam="Leipzig,Bravura,smufl" -- this would choose the first available named font, and if neither were available would choose an available smufl font. (There would be an additional issue of having renderers know all possible 'smufl' fonts installed on a system for this to work automatically, though).

ahankinson avatar Jan 28 '22 12:01 ahankinson

during 2022 dev meeting in Berlin, @fujinaga, @lpugin, @pe-ro, @musicEnfanthen and @kepper came to the conclusion that we keep it as it is, to allow fallbacks and some such. Closing as wontfix…

kepper avatar Oct 02 '22 10:10 kepper