Make monospace font-size configurable

Forum rules
1. Please keep it one request/suggestion per topic.
2. Please mark the requests with the following tags:
[Startup] - issue related to the program's startup or shutdown process;
[Taking] and [Clipping] - related to acquiring/creating notes (excl. editing);
[Viewing] - related to notes list browsing and reading;
[Editing] - related to the process of editing new and existing notes;
[Search] - related to note searching and finding;
[Managing] - related to note organization and management;
[Reordering/Sorting] - related to sorting or reordering the notes list;
[Clipboard] - clipboard operations;
[Import] and [Export] - issue related to bulk notes import/export;
[Globalization] - issues related to multiple languages/cultures support;
[Files] and [Backup] - file operations,notes back-end and backup;
[UI] - UI issues which don't fall into any of the above categories;
[Other] - other issues which don't fall into any of the above categories.

Thank you!
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Make monospace font-size configurable

Postby Thomas Lohrum » Tue Feb 19, 2013 11:20 am

Alex,

please allow the size of the monospace-font to be independent from the notes-list font-size. No need for a GUI setting. A simple setting in the settings-file will be fine. The corresponding discussion can be found here: viewtopic.php?f=3&t=1463

Thank you!

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Make monospace font-size configurable

Postby CintaNotes Developer » Tue Feb 19, 2013 1:29 pm

Thomas,
this enhancement is unfortunately not trivial to do, since now the editor only supports single font size.
If we add support for multiple sizes, we will need to update large parts of code responsible
for calculating line heights etc, both in editor and in the note preview renderer.

So I am willing to go forward on this only if I see much demand from the community.
Could you please add this request to the roadmap?
Thanks!
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: Make monospace font-size configurable

Postby Thomas Lohrum » Tue Feb 19, 2013 10:01 pm

CintaNotes Developer wrote:this enhancement is unfortunately not trivial to do, since now the editor only supports single font size.

Thank you for your explanation. I understand. However, i am not asking for mixed font sizes. I use a monospace font as the default for my notes. Now the times has come to switch to a proportional font. This is because of the great support of bullet lists. We talked about this before. For a migration i will export all notes, modify them to mark them as monospace, change the notes-list font, and import back. So far, so good.

The problem is, that when i open an old note that uses a fixed font, the text looks just small. This is the nature of fixed font. They look smaller compared to a proportional font, even when they have the same size.

I realize CN works different from my expectations. What would be needed to solve the issue, is a way to mark a note to be a fixed-font-note. This would imply, that it is not possible to mix fonts. It would also allow to use a font and a size of its own.

Any ideas on this Alex?

Thank you.

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Make monospace font-size configurable

Postby CintaNotes Developer » Wed Feb 20, 2013 11:10 am

I think you could try the following:
1) Export to XML
2) In XML do text replace:

Code: Select all

plainText="1"
=>

Code: Select all

plainText="0"

Code: Select all

<![CDATA[
=>

Code: Select all

<![CDATA[<pre>

Code: Select all

]]>
=>

Code: Select all

</pre>]]>


At least I think it's worth a try)
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: Make monospace font-size configurable

Postby Thomas Lohrum » Sat Feb 23, 2013 12:06 am

CintaNotes Developer wrote:I think you could try the following:
1) Export to XML
2) In XML do text replace:

Hi Alex,

i tried this approach, as i already did last December. I can not get it to work, the way i like it. For example, when i export such a note to HTML, word-wrap is not supported. The note is not readable. I think what i need is a setting that affects the entire note, such as FixedFont="1". No need for <pre> tags. If set to true ("1") the monospace font will be used. If set to false ("0") the notes list font will be used.

What do you think? Am i missing something? Would it be difficult to implement? I want to post a request to the roadmap, but like to understand the matter, before doing so.

Thanks

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Make monospace font-size configurable

Postby CintaNotes Developer » Tue Feb 26, 2013 2:20 am

Thomas Lohrum wrote:i tried this approach, as i already did last December. I can not get it to work, the way i like it. For example, when i export such a note to HTML, word-wrap is not supported. The note is not readable. I think what i need is a setting that affects the entire note, such as FixedFont="1". No need for <pre> tags. If set to true ("1") the monospace font will be used. If set to false ("0") the notes list font will be used.

What do you think? Am i missing something? Would it be difficult to implement? I want to post a request to the roadmap, but like to understand the matter, before doing so.

Ok, so the problem is word wrapping. I think it should be quite easy to do it with Python, it contains a special module called textwrap
just for this purpose:

Code: Select all

import textwrap

text = 'The quick brown fox jumps over the lazy dog.'
print('\n'.join(textwrap.wrap(text, width=20)))


It would be easiest to re-use parts of the xml2txtdir utility code from here: http://cintanotes.com/forum/viewtopic.php?f=3&t=1352.
If you need my help, just ask)
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: Make monospace font-size configurable

Postby Thomas Lohrum » Tue Feb 26, 2013 10:44 am

CintaNotes Developer wrote:Ok, so the problem is word wrapping. I think it should be quite easy to do it with Python, it contains a special module called textwrap just for this purpose:

Thanks Alex, but i don't understand how that would help me.

To make things clearer and have a general approach i suggest to have an option on per note setting. Mark the complete note as either monospace or proportional font note. That way the only thing that must be done, is to decide which font to use when opening the note. No need to switch fonts oder mix fonts while the editor is open.

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Make monospace font-size configurable

Postby CintaNotes Developer » Thu Feb 28, 2013 8:20 am

Thomas Lohrum wrote:
CintaNotes Developer wrote:Ok, so the problem is word wrapping. I think it should be quite easy to do it with Python, it contains a special module called textwrap just for this purpose:

Thanks Alex, but i don't understand how that would help me.

To make things clearer and have a general approach i suggest to have an option on per note setting. Mark the complete note as either monospace or proportional font note. That way the only thing that must be done, is to decide which font to use when opening the note. No need to switch fonts oder mix fonts while the editor is open.

Thomas


I think your solution is much more complicated than is really necessary.
The extra mode will create more user confusion, more modes means more bugs, and the db format will have to be changed.
This clearly is overkill for a one-time format migration task.

I suggest you to use the Python script that would just insert linebreaks into XML where you're now missing them. I can help you with it if you want, it's no problem.
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: Make monospace font-size configurable

Postby Thomas Lohrum » Thu Feb 28, 2013 5:30 pm

Thanks for your help Alex. This afternoon i switched from Courier New 10 to Verdana 11. I take the risk. At first sight things look good. I also did some exports to verify the changes. In case of notes, that won't look well with the proportional font i will select the entire text and mark it as monospace. Due to the feature "save without modifying timestamp" i can update it without hassle.

I also voted for the following request, that describes my need in a more general approach: http://roadmap.cintanotes.com/topic/147 ... r-sources/

Thomas

Return to “Feature Requests”