Description: If you change the font of Functions to Bold in Libre Writer, its keep resetting to regular font every time we reopen the file. Is this a bug, or Functions are not allowed to set in bold formatting. If functions can't be set to bold, why is the option for bold given in formatting of Functions in formula. I'm using Windows version 7.0.6 Also, please add a tool to give highlighting to formula. Actual Results: Functions in regular font. Expected Results: Functions in bold font. Please see the link to Libre Ask Reproducible: Always User Profile Reset: No OpenGL enabled: Yes Additional Info: Please refer to this question for more details of the issue. https://ask.libreoffice.org/en/question/317023/font-formating-in-formula-not-applying/
Created attachment 173385 [details] Font formating in Formula not applying If you change the font of Functions to Bold in Libre Writer, its keep resetting to regular font every time we reopen the file. Is this a bug, or Functions are not allowed to set in bold formatting. If Functions can't be set to bold, why is the option for bold given in formatting of Functions in formula. Im using windows version 7.0.6
Can not confirm. There are no StarMath 'Functions' in the example {{ %pi } over {2} } file. "Functions" are as found on the the Math formula editor Element's 'Functions' panel. Currently, only these strings in a sm function will take the assigned 'Function' formatting (the font--including a bold or italic styling, and size): e ln exp log sin cos tan cot sinh cosh tanh coth arcsin arccos arctan arccot arcsinh arcosh artanh arcoth func They all take the font and size formatting applied via the Format -> Fonts... and Format -> Font Size... dialogs.
Im a bit confused its not a bug then Why is the Pi not getting bold. I had turned on bold for everyfont in the font format menu. see the link to ask. bold for functions are automatically unticking after saving and reopening. and also their is no option for highlighting formula
Created attachment 173389 [details] Screen cast of the problem Pi not getting bold is unrelated to the problem. The real problem is that the bold setting applied to the functions in Math gets reset upon save and reload.
(In reply to Mike Kaganski from comment #4) > Created attachment 173389 [details] > Screen cast of the problem > > Pi not getting bold is unrelated to the problem. The real problem is that > the bold setting applied to the functions in Math gets reset upon save and > reload. After making some changes from the Format -> Fonts... dialog, when written to ODF Formula (.odf) archive--the stanza is intact <config:config-item config:name="FontFunctionsIsBold" config:type="boolean">true</config:config-item><config:config-item config:name="FontFunctionsIsItalic" config:type="boolean">false</config:config-item><config:config-item config:name="FontNameFunctions" config:type="string">Libertinus Sans</config:config-item> But on reopening, while the font name is picked up its isBold status is not. So, that is confirmed for the filter import.
(In reply to RGarudan from comment #3) > Im a bit confused its not a bug then Why is the Pi not getting bold. I had > turned on bold for everyfont in the font format menu. > see the link to ask. bold for functions are automatically unticking after > saving and reopening. > and also their is no option for highlighting formula Basically, the sm markup uses its own catalog of symbols (glyphs drawn from OpenSymbol font though for bug 101174 we hope to be able to use alternate) and renders those directly as a sm formula "node" based on other metrics of the formula. To make those formula nodes render bold in sm you must prepend bold--e.g. 'bold %pi' See the Greek characters and Special characters (pg 76 - 79 of Appendix A) in https://documentation.libreoffice.org/assets/Uploads/Documentation/en/MG7.0/MG70-MathGuide.pdf
(In reply to V Stuart Foote from comment #5) > > But on reopening, while the font name is picked up its isBold status is not. > > So, that is confirmed for the filter import. Should note, if changes in the Format font & size dialogs are assigned as new defaults. When the ODF is reopened it honors those defaults (bold or italic are restored). It is only when the ODF is used as source for a new OLE Formula object, that the filter import does not honor the archives bold or italic value--but does pick up the font assignment.
Also can you add a tool for highlighting formulas just like we do in writer.
(In reply to RGarudan from comment #8) > Also can you add a tool for highlighting formulas just like we do in writer. Sorry, not only is that off topic here--but it is unclear. File a new BZ issue for enhancement fully describing the use case, if it is not already written up.
Indeed, I was just about to file this issue as well. To me, however, it appears as if the issue only occurs when *editing* a formula in a *reopened* document. When opening the document, any attributes to fonts for Variables, Functions, Numbers, Text are preserved. It is only when the formula is opened for editing that the attributes are lost, and then only when the formula font settings differ from the default font settings for a newformula. This is LO 7.4.5.1 on Fedora 37. Steps to reproduce the issue * Create Formula 1. Set the Italic attribute to any of the font categories. * Create Formula 2. Set different fonts on that formula, then click "Save" to save the new settngs as default. * Save the document * Open it again: attributes of Formula 1 are preserved. * Double-click Formula 1 and exit formula editor again: attributes are lost * Double-click Formula 2 and exit formula editor: attributes are preserved (that formula is formatted according to the current Default
(In reply to fmgtack+libreoffice from comment #10) > the issue only occurs when *editing* a formula in a *reopened* document. > > When opening the document, any attributes to fonts for Variables, Functions, > Numbers, Text are preserved. It is only when the formula is opened for > editing that the attributes are lost Indeed, you see this, because your document shows you the *cached image* of your formula, until you enter the formula for editing. The formula data is already not what you expect, but the image still shows what was there in the previous editing session. See also bug 66463 (dealing with the cached images of formulas).
I see. This bug is thus more severe than I expected at first. I just came on to a document today where I recently painstakingly changed fonts in formulae, to see that today, the italics attributes of the equations were reset. That would mean that these formula's all must have been redrawn - I wonder what, besides editing the equation, triggers a redraw. Adding to how painstaking it is to have to change properties for each individual equation, this makes things hardly manageable.
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/626d17a8ec270937575e9684a325eb0669327a25 tdf#143213: Fix reading math font settings from file It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.