In version 7.6.3, the Verdana formula font became bold when copied into Gimp

In version 7.6.3, the Verdana formula font became bold when copied into Gimp. Although in version 7.4.7 it copies the normal font

Here are my actions:
I launch Writer
Insert - OLE - Formula
Format - Font. Change font to Verdana
Type some formula
Return to Writer
Copy formula to Clipboard: Ctrl+C
Past formula to Gimp: Ctrl+V
And font of formula copied as Bold, although in version 7.4.7 it copies the normal font

Just ignoring the bold issue here because there appears to be a bigger problem. When you paste the formula into GIMP it just pastes it as a raster image at a low screen resolution. You would be better to File > Export as PNG and set an appropriate resolution and then size; drag that new png file into GIMP.

Do you need to use GIMP for special effects on the formula? If copied into Draw then the formula and additional text/images/background could be exported as PDF, PNG, JPG or possibly SVG; or just create in Writer and export as one of first three.

BTW I don’t see the added bold with Verdana into GIMP 2.10.28
VerdanaPastedIntoGIMP

Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 29d686fea9f6705b262d369fede658f824154cc0
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-NZ (en_NZ); UI: en-GB
Calc: CL threaded

1 Like

I tried exporting to Draw, nothing changed
When I export to PNG, it is not the formula that is exported, but the entire page measuring 795x1124 pixels

I’ll try to declare what I want to do.
I want to make an HTML document with the Verdata font and have the formula font match the page font.
It seems logical to me that you set the same font for the page and formulas and expect to see the same result.
Last year, in version 7.4.7, it worked. This year, in version 7.6.3, it doesn’t work.

Here is a screenshot of an HTML document with the typed formula and pictures.
Please note where “HTML-text:” is the typed text.
Below, where “PNG-picture” is a picture.
HTML text and image in LibreOffice 7.4.7 are visually the same.
And HTML text and images in LibreOffice 7.6.3 are visually different.

I also have a zip-archive with an example - “LibreOffice archive - Verdana formula font.zip”. Unfortunately I can’t upload it to this site. I uploaded it to the cloud, where it is stored for 7 days.

Here is a link to the “LibreOffice archive - Verdana formula font.zip” in the cloud. There is an html document:

I can’t reproduce your issue on 7.6.3.

When I copy a formula to my bitmap editor, the font doesn’t change:

Why don’t you compose your math formula directly in mathML without LO Math intermediate step?

Make sure you tick Selection in the export dialogue: select the formula frame, click File > Export, tick the box Selection, choose a format (PNG from Writer but from Draw SVG scales without loss), navigate to folder, give image a name, Save. In the PNG Options dialogue, set width to say double. The right Border in Math needs to be widened to say 1 or the export to PNG clips the last digit
ExportFormulaFromDraw.odg (28.1 KB)

Better would be to use a tool designed for your use case as above

BTW Both your

LibreOffice 7.6.3 —> Gimp 2.10.34

are in Liberation Serif, not Verdana

Because I want to convert an html document into a chm book, then open this book with the KchmViewer program, but it does not support MathML. Therefore, you have to insert images into the html

I am sending an archive with an example “LibreOffice - Verdana formula font.zip”. Try opening the html file in an editor, such as Kompozer, and try inserting your formula so that the font looks like html Verdana

вт, 28 нояб. 2023 г. в 09:52, Panos Stokas via Ask LibreOffice <noreply@ask.libreoffice.org>:

(Attachment LibreOffice - Verdana formula font.zip is missing)

And I cannot export the selected formula, but I can only export the entire file. There is no Selected option in the export window.
I click File - Export - PNG and the following window appears:

Try opening an example

in WYSIWYG html file editor KompoZer and try to insert your formula so that the font is not visually different from Verdana

Or

  1. Create in WYSIWYG html file editor, like KompoZer, BlueGriffon, SeaMonkey, new html-document

  2. Add Style in a Head section

body { font-family: Verdana; }
  1. Type html text to compare:
    a2+b2=c2

  2. Create your formula and paste it as image into this html-document

  3. Visually Compare the font in the typed text and the picture, they should not be different

TickSelectionForPNG

You need to set Verdana in Math, you have the default Liberation Serif set there.

I did what you suggest. I typed the formula directly into Draw. Then I clicked File - Export (selected) - PNG. Opened the file in Gimp and added a white layer. The result was half as good. But still, the formula font is visually different from the font in the html document.
That is, I cannot ensure that the formula font is not visually different from the font in the html document

Here is the result
In paragraph 5, the font has become better, but still differs from paragraph 2