Editor Uses Wrong Font

Having trouble installing Oxygen? Got a bug to report? Post it all here.
sarcanon
Posts: 39
Joined: Mon Aug 24, 2009 11:42 pm

Editor Uses Wrong Font

Post by sarcanon »

Hello. I am running OxygenXML 24.1 (build 2022092207) on Windows 10 (x64).

I have a single window with 13 tabs open, with a combination of XML, XSLT, and TXT files, all local to my machine. The Editor font set in Appearance panel of Preferences dialog is Noto Sans Mono (size: 12). All tabs except one correctly use this font setting, except for one, which seems to use the font set for Author default font (Times New Roman (size: 14)). I don't ever use Author. I only ever use Oxygen Editor.

I have tried closing and re-opening this document multiple times, but it always re-opens with the Author font (Times New Roman), not the Editor font (Noto Sans Mono).

Can you please tell me how I can fix this and this one document window to respect the Editor Font preference?

Thank you very much in advance.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Editor Uses Wrong Font

Post by chrispitude »

Hi Scott,

If you open the Options > Preferences > Appearance > Fonts setting window and press F1, the following documentation topic should open:

Oxygen XML > Fonts Preferences

In this case, I believe "Author" refers to the WYSIWYG authoring windows in Oxygen that are capable of showing formatting (such as for non-XML content). You might see Text / Grid / Author selectors at the bottom of this window that switching between the editing view and the authoring view.
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: Editor Uses Wrong Font

Post by Radu »

Hi,
For that specific document which is opened from the beginning with a different font, does it have long lines?
https://www.oxygenxml.com/doc/versions/ ... es_of_text
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sarcanon
Posts: 39
Joined: Mon Aug 24, 2009 11:42 pm

Re: Editor Uses Wrong Font

Post by sarcanon »

Yes, it has long lines. Text wrapping is enabled for this document. I do get the "Long Lines" warning dialog when I open it. The longest is line is apparently 15,080 characters (!).

Is there any easy way to identify the long lines and investigate whether they can be split up? Also, what is the line length limit to avoid this condition?

Thank you.
- Scott
sarcanon
Posts: 39
Joined: Mon Aug 24, 2009 11:42 pm

Re: Editor Uses Wrong Font

Post by sarcanon »

Well, I have answered my own question, partially at least.

After finding a utility to identify the long lines, I trimmed the longest ones down a bit, and found that if I re-open with no line exceeding 5,555 characters, then I am spared the "Long Lines" warning dialog. So, presumably the limit is a number greater than 5,555. The exact number is no longer important for me, since I now know why the "wrong font" behavior occurred in the first instance, and how to deal with it.

Thank you for another quick resolution of my problem!

- Scott
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: Editor Uses Wrong Font

Post by Radu »

Hi Scott,

In the Oxygen Preferences->"Editor / Open" page you have an "Optimize loading for documents with lines longer than..." setting and its associated checkbox "Show warning when opening..." which should give you control over Oxygen's behavior. By default Oxygen shows you a warning when opening such documents.
To break long lines on multiple lines, if it's an XML file usually Oxygen's "Format and indent" toolbar action will prettify your XML and break long text lines if they are not in a space preserve context.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Frank Ralf
Posts: 457
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Editor Uses Wrong Font

Post by Frank Ralf »

Hi Radu,

Thanks for the information about long lines affecting the font settings. I faced the same problem when automatically opening the XML output from an XSLT transformation in the editor. Turned out that the complete output was in one line. Adding indent="yes" to the XSLT solved the problem.

Code: Select all

<xsl:output method="xml" indent="yes"/>
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
Post Reply