Aleks-Ya / note-size-anki-addon

GNU General Public License v3.0
2 stars 0 forks source link

Formatting of size looks odd on Windows #1

Closed user1823 closed 2 months ago

user1823 commented 2 months ago
Aleks-Ya commented 2 months ago

I don't have experience in design, so I just used default fonts here. Sizes (e.g. 322B) are formatted mono-spaced to make them stand out from the rest of the text. Could you explain what exactly you'd change in the formatting?

user1823 commented 2 months ago

In the following image, the file sizes are displayed better IMO.

On Windows, KB appears smaller than the numbers, which appears odd.

Regarding the use of monospaced fonts, I want to mention that Qt (the toolkit used by Anki) defaults to Courier for monospaced font on Windows despite a much better font (Consolas) being available on practically all versions of Windows. To overcome this, you may want to use an approach similar to Anki.

https://github.com/ankitects/anki/blob/33a923797afc9655c3b4f79847e1705a1f998d03/qt/aqt/addons.py#L1585-L1587

https://github.com/ankitects/anki/blob/33a923797afc9655c3b4f79847e1705a1f998d03/ts/editor/CodeMirror.svelte#L107

Aleks-Ya commented 2 months ago

Hi @user1823 , I applied Consolas font on Windows. Does it look ok now (it's not published yet): image

user1823 commented 2 months ago

Yes, looks better now.

Aleks-Ya commented 2 months ago

Fixed in release 1.7.0