On Tue, Sep 01, 2020 at 09:03:35PM +0200, Pavel Sanda wrote:
> On Tue, Sep 01, 2020 at 07:56:43PM +0200, Cor Blom wrote:
> > I have some additional information on top of my previous response with the
> > screenshots. When I leave the tex fonts enabled and I link the lyx fonts
> > into /usr/share/fonts in the folder lyx, nothing changes, but if I name the
> > link zlyx I have the same result as without texfonts. It seems the fonts are
> > read alphabetically and the last result is used.

This is strange. To see whether fontconfig is able to spot the lyx fonts
you can try the following command:

fc-match -v "esint10: style=lyx" | grep file:

whose output should be the path to the used font file.

> Another option would be to patch the sources for packaging and rename
> esint10.ttf to e.g. lyxesint10.tff as well as all occurences of esint
> in the code (most important would be symbols file).
> 
> Yet another option would be that we do this upstream, I am not sure how
> good idea is it though.

Very bad idea. The lyx font files should be found by their style. The font
file name and font family name are totally unrelated to each other.

> Maybe there is also some more elegant solution to change the way lyx picks
> the font (I'm not sure if its fontconfig or lyx influences that decision) -
> don't know this part of the code well and don't have your setup to debug it.

We already have an elegant solution. We rely on Qt to do the right thing
with QFontDatabase::addApplicationFont(), but on linux it does not work
right, contrarily to Windows (and I think MacOS) where it works well.
In this case it should suffice to directly add the lyx font directory
to the fontconfig paths. The fonts ditributed with lyx are a superset
of the texlive ones and could also replace them. However, this is not
necessary because we can find our fonts by requesting the style "LyX",
provided that fontconfig can find them.

-- 
Enrico
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to