On 21.11.2016 11:16, racoon wrote:
On 20.10.2016 19:29, Jean-Marc Lasgouttes wrote:
2/ I can provide you with methods MetricsInfo:::textToInsetOffset and
MetricsInfo::textToInsetInnerOffset  that returns the pixel values
equivalent to 0.3em and 0.15em (according to your changes).

In the second case, the spacing will be larger when the font is larger,
for example in a section title. I think that this makes sense. Anyway,
the idea is to provide a method that gives a directly usable pixel
amount.

Hi JMarc,

I could make use of an em to pixel conversion for another ticket:

www.lyx.org/trac/ticket/9376#comment:9

I am using

Length(lyxrc.full_screen_width, Length::EM).inPixels(0)

I thought this gets me from em to pixel. But it seems not to give the
right result: with fixed text-width set in preferences the text still
wraps differently depending on zoom.

Maybe I misunderstood how em to pixel works. I just thought that the text should look the same way when zoomed just everything becomes larger. But I just tried a test with an html file (attached). When zooming in the wrapping changes as well in the browser (for some reason in chromes less so than in firefox but that might be explained by different zoom levels?). So Maybe it is all good after all. Then the patch is done I guess.

Daniel

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Reply via email to