Am 26.09.2017 um 21:10 schrieb Enrico Forestieri <for...@lyx.org>:
> 
> On Mon, Sep 25, 2017 at 11:38:05PM +0200, Stephan Witt wrote:
>> Am 25.09.2017 um 23:23 schrieb Enrico Forestieri <for...@lyx.org>:
>>> 
>>> There are a few icons with empty text, but there are also all the ipa icons
>>> that contain text. These texts should be changed to paths, otherwise they
>>> will be rendered wrongly if the requested font is not present. This is easy
>>> to do with inkscape.
>> 
>> That would be good, indeed.
> 
> I have cleaned up some of the icons but not all.

Thank you. BTW, what’s the tool to convert text to paths?

>> So I tried this…
>> 
>> $ lyxconvert -platform minimal -d math-subscript.svg math-subscript.pdf
>> lyxconvert: platform is minimal
>> lyxconvert: Load file 'math-subscript.svg', infmt is 'auto'
>> lyxconvert: Save converted image to file 'math-subscript.pdf', outfmt is 
>> ‚pdf'
>> 
>> … what worked too - even better because no font database is expected.
> 
> I think this is going to work on all platforms.
> 
>> Probably the text rendering would be broken then. But I’d guess it’s
>> broken on Mac with offscreen anyway. At least it seems so if I put some
>> strings into the math-subscript.svg text elements.
> 
> I see the text when using the offscreen plugin but not when using the
> minimal one (characters are replaced by boxes in this case).

That makes sense. Minimal is a pure QImage as „screen“ - no fonts at all.
And „offscreen" is supported by e.g. Xnest for a long time with X11.
The Qt docs contain the statement it works good with X11 and is unfinished
on other platforms, AFAIR.

Therefore I’d propose to make the whole lyxconvert „project“ platform
specific as it tries to solve a problem we’re having on Mac only.
The Mac bundle has the version-suffix at container level - no need
to care for it in convertDefault.py. Instead I’d check for the platform
and call lyxconvert on „darwin“ only with -platform minimal. Of course
the user has to install Inkscape.app when he wants to include „real“ SVG
images in his documents.

What do you think? IMO, the benefit on Mac is enough to take the risk.
That’s not true for the other platforms.

Stephan

Reply via email to