klimeryk / recalendar.js

ReCalendar - create your personalized calendar PDF for ReMarkable tablets
https://recalendar.me/
GNU Affero General Public License v3.0
284 stars 65 forks source link

Using Unicode characters #76

Closed ovidiusoft closed 1 year ago

ovidiusoft commented 1 year ago

Hello, I am trying to use Unicode characters like "WHITE SQUARE WITH ROUNDED CORNERS" for the purpose of including checkboxes for itineraries/goals, but the preview and the generated PDF don't seem to render them correctly. Is this something that could be fixed? (In the mean time, I am using [_] 😄 ).

klimeryk commented 1 year ago

Clever workaround! 😄 The limitation is not in the software - it's the font itself. Unfortunately, looks like neither of the four fonts in ReCalendar (that you can choose in the "General options" section) support his Unicode character. The closest one that does seem to work (at least with Lato font) is "WHITE SQUARE": .

Screenshot 2023-05-25 at 23 19 23

Hope this helps! It's definitely on my radar to add proper checkbox-like items 🙇

ovidiusoft commented 1 year ago

Ooooooh 🤦‍♂️ I did not even think of the font missing the glyph... You're right. I did a quick test with Noto and results are better (not better than my hack with [_] unfortunately, so some more font testing might be needed). I think this can be closed, as it's not a software problem. Maybe including a "complete" Unicode font would be a nice enhancement for the future?

Screenshot 2023-05-26 at 10 20 24
klimeryk commented 1 year ago

I'm open to suggestions on a complete Unicode font to include 👍 I thought Lato (the 2.x one from https://www.latofonts.com/) was pretty complete, but that's probably for letters from different alphabets, not every possible Unicode glyph 😬

ovidiusoft commented 1 year ago

It seems Unicode is huge and there is no font that has it all, so I did a quick test with some fonts that are popular and under active development. The DejaVu family looks good on screen, it should include letters from various alphabets, and have 2 out of the 3 boxes implemented :) - https://dejavu-fonts.github.io

Here are some quick tests:

DejaVu Sans:

Screenshot 2023-05-27 at 10 50 55

DejaVu Serif:

Screenshot 2023-05-27 at 10 51 28

I personally like the Sans version. Both would need some tweaking (minicalendar needs some spacing tweaks).

Bottom line is: it's not worth the time invested to replace the fonts and tweak the various elements, if in the future you plan on implementing checkboxed rows anyway (or, if I can squeeze a wish here: a row that is made up of a FontAwesome icon + text, which would allow us not only to create checkbox items, but also something like " Go check the brakes!" ;-) )

I think the default fonts are great and I don't really see a need to change from Lato, really.

klimeryk commented 1 year ago

Thanks for a thorough investigation! Yup, Unicode is huge. DejaVu is a good and well-known family of fonts, so I'd be open to including them, but like you noticed, there are some parts of ReCalendar that are quite tightly packed. Minicalendar is especially optimized for space to fit all those cells while still not overcrowding the space. I'm hoping that I'll be able to provide a proper support for things like checkboxes soon, so I agree with you that it's not worth it for now 🙇 Appreciate going on this exploration with me, though!

klimeryk commented 1 year ago

a row that is made up of a FontAwesome icon + text, which would allow us not only to create checkbox items, but also something like " Go check the brakes!" ;-) )

I like it! FontAwesome is definitely on my mind when implementing this. I like the idea of allowing more arbitrary icons. I'll definitely keep that in mind while working on this feature.