Bug 421057 - Cantor does not use system font by default
Summary: Cantor does not use system font by default
Status: ASSIGNED
Alias: None
Product: cantor
Classification: Applications
Component: general (other bugs)
Version First Reported In: 20.04
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Nikita Sirgienko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 12:58 UTC by avlas
Modified: 2020-05-05 15:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Cantor load system font (132.50 KB, image/png)
2020-05-05 15:05 UTC, Nikita Sirgienko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description avlas 2020-05-05 12:58:57 UTC
In my system it uses .Helvetica Neue Desk UI, I don't know why, even though my system font is Cabin.

Also, it may actually be good to have an option for specyfing font styles (regular and monospace) in settings, but by default Cantor should use system's.

This seems to happen in all backends.
Comment 1 Nikita Sirgienko 2020-05-05 15:04:55 UTC
(In reply to avlas from comment #0)
> In my system it uses .Helvetica Neue Desk UI, I don't know why, even though
> my system font is Cabin.
> 
> Also, it may actually be good to have an option for specyfing font styles
> (regular and monospace) in settings, but by default Cantor should use
> system's.
> 
> This seems to happen in all backends.

Cantor via Qt load system font for all aplication. Do you really sure, that you changed "Fixed size" system font? For example, see attachment #1 [details]
Comment 2 Nikita Sirgienko 2020-05-05 15:05:14 UTC
Created attachment 128178 [details]
Cantor load system font
Comment 3 avlas 2020-05-05 15:17:27 UTC
Hmm, unfortunately it doesn't seem to work for me.

These are my KDE font settings:

https://i.imgur.com/g5Tqimg.png

And this is how Cantor looks like:

https://i.imgur.com/X5EfNbE.png
Comment 4 avlas 2020-05-05 15:19:55 UTC
(In reply to Nikita Sirgienko from comment #2)
> Created attachment 128178 [details]
> Cantor load system font

Actually in your screenshot I can see AkrutiMal1 as font in the toolbar. That's what I refer to actually.
Comment 5 avlas 2020-05-05 15:25:45 UTC
I guess this issue could be rephrase as follows:

- Use non-monospace system font for text that is not actually code: raw text input and markdown

- Display proper font name in the toolbar, i.e., system's monospace default font when using code input and system's non-monospace default font when using regular text and markdown. Then the user can change those if wanted
Comment 6 Nikita Sirgienko 2020-05-05 15:33:00 UTC
(In reply to avlas from comment #4)
> (In reply to Nikita Sirgienko from comment #2)
> > Created attachment 128178 [details]
> > Cantor load system font
> 
> Actually in your screenshot I can see AkrutiMal1 as font in the toolbar.
> That's what I refer to actually.

Interesting, because this is a rich text toolbar, which comes from old Cantor part of code and works only in Text entries. Visible value inside the combo lix actually wrong (bug). Also, is this element active in Command entries in your Cantor?
Comment 7 avlas 2020-05-05 15:40:11 UTC
(In reply to Nikita Sirgienko from comment #6)
> (In reply to avlas from comment #4)
> > (In reply to Nikita Sirgienko from comment #2)
> > > Created attachment 128178 [details]
> > > Cantor load system font
> > 
> > Actually in your screenshot I can see AkrutiMal1 as font in the toolbar.
> > That's what I refer to actually.
> 
> Interesting, because this is a rich text toolbar, which comes from old
> Cantor part of code and works only in Text entries. Visible value inside the
> combo lix actually wrong (bug). Also, is this element active in Command
> entries in your Cantor?

It starts disabled but it gets enabled by default after:

- I add a text line or convert to it (and remains enabled in all worksheet lines irrespective of type)

- When I open a secondary worksheet (and remains enabled for all worksheets, the first and the second, and all their lines)

Also having monospace for markdown is not really looking that good, I would suggest to move markdown to system's non-monospace default (code inserted in markdown will be monospace anyway)
Comment 8 Nikita Sirgienko 2020-05-05 15:41:14 UTC
(In reply to avlas from comment #5)
> I guess this issue could be rephrase as follows:
> 
> - Use non-monospace system font for text that is not actually code: raw text
> input and markdown
>
> - Display proper font name in the toolbar, i.e., system's monospace default
> font when using code input and system's non-monospace default font when
> using regular text and markdown. Then the user can change those if wanted
Yes, you right. Cantor shouldn't use monospace on text and markdown entries. Also, default value of font changer should be fixed too. But actually, this toolbar should work only in text entries. For all another entries there is "Right Click Menu -> Font -> Select".
Comment 9 avlas 2020-05-05 15:44:06 UTC
(In reply to Nikita Sirgienko from comment #8)
> (In reply to avlas from comment #5)
> > I guess this issue could be rephrase as follows:
> > 
> > - Use non-monospace system font for text that is not actually code: raw text
> > input and markdown
> >
> > - Display proper font name in the toolbar, i.e., system's monospace default
> > font when using code input and system's non-monospace default font when
> > using regular text and markdown. Then the user can change those if wanted
> Yes, you right. Cantor shouldn't use monospace on text and markdown entries.
> Also, default value of font changer should be fixed too. But actually, this
> toolbar should work only in text entries. For all another entries there is
> "Right Click Menu -> Font -> Select".

I see. Thanks for letting me know.

One more thing I just realized. Is it possible to edit Markdown entries? It seems I cannot modify those, but maybe I'm missing how to do this properly
Comment 10 Nikita Sirgienko 2020-05-05 15:45:37 UTC
(In reply to avlas from comment #7)
> (In reply to Nikita Sirgienko from comment #6)
> > (In reply to avlas from comment #4)
> > > (In reply to Nikita Sirgienko from comment #2)
> > > > Created attachment 128178 [details]
> > > > Cantor load system font
> > > 
> > > Actually in your screenshot I can see AkrutiMal1 as font in the toolbar.
> > > That's what I refer to actually.
> > 
> > Interesting, because this is a rich text toolbar, which comes from old
> > Cantor part of code and works only in Text entries. Visible value inside the
> > combo lix actually wrong (bug). Also, is this element active in Command
> > entries in your Cantor?
> 
> It starts disabled but it gets enabled by default after:
> 
> - I add a text line or convert to it (and remains enabled in all worksheet
> lines irrespective of type)
> 
> - When I open a secondary worksheet (and remains enabled for all worksheets,
> the first and the second, and all their lines)
> 
> Also having monospace for markdown is not really looking that good, I would
> suggest to move markdown to system's non-monospace default (code inserted in
> markdown will be monospace anyway)

Well, it is a another bug actually.
Comment 11 Nikita Sirgienko 2020-05-05 15:49:14 UTC
(In reply to avlas from comment #9)
> (In reply to Nikita Sirgienko from comment #8)
> > (In reply to avlas from comment #5)
> > > I guess this issue could be rephrase as follows:
> > > 
> > > - Use non-monospace system font for text that is not actually code: raw text
> > > input and markdown
> > >
> > > - Display proper font name in the toolbar, i.e., system's monospace default
> > > font when using code input and system's non-monospace default font when
> > > using regular text and markdown. Then the user can change those if wanted
> > Yes, you right. Cantor shouldn't use monospace on text and markdown entries.
> > Also, default value of font changer should be fixed too. But actually, this
> > toolbar should work only in text entries. For all another entries there is
> > "Right Click Menu -> Font -> Select".
> 
> I see. Thanks for letting me know.
> 
> One more thing I just realized. Is it possible to edit Markdown entries? It
> seems I cannot modify those, but maybe I'm missing how to do this properly

In what sense edit? Markdown entry have two state "editing" and "rendered". You can edit the entry with "editing" state but not in "rendered". Evaluation change state from "editing" to "rendered" (and do render), but double click on the markdown entry change it from "rendered" to "editing".
So if you want to change already executed Markdown Entry, you just need double click it.
Comment 12 avlas 2020-05-05 15:54:24 UTC
(In reply to Nikita Sirgienko from comment #11)

> > One more thing I just realized. Is it possible to edit Markdown entries? It
> > seems I cannot modify those, but maybe I'm missing how to do this properly
> 
> In what sense edit? Markdown entry have two state "editing" and "rendered".
> You can edit the entry with "editing" state but not in "rendered".
> Evaluation change state from "editing" to "rendered" (and do render), but
> double click on the markdown entry change it from "rendered" to "editing".
> So if you want to change already executed Markdown Entry, you just need
> double click it.

Right, double click (I looked for an option using right click but didn't find it)