Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for adding LVGL custom fonts #23669

Closed
wants to merge 1 commit into from

Conversation

shawnfelix
Copy link

@shawnfelix shawnfelix commented May 5, 2024

Description

Added documentation:
Instructions for adding custom fonts with QP LVGL integration

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

  • N/A - Just some added knowledge in the documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@shawnfelix shawnfelix closed this May 5, 2024
@shawnfelix shawnfelix reopened this May 5, 2024
@shawnfelix shawnfelix closed this May 5, 2024
@shawnfelix shawnfelix reopened this May 5, 2024
@drashna drashna requested review from tzarc and a team May 19, 2024 04:40
@drashna
Copy link
Member

drashna commented May 19, 2024

And @elpekenin, any issues with this?

@elpekenin
Copy link
Contributor

Nothing against nor in favour about this, mainly bcs i have never used LVGL. (that also means i dont even know if the funcs/macros used are even correct)

I guess extra documentation doesnt harm, but on the other hand it makes relevant information harder to find, specially with how bad the search tool sometimes works...

And since this mostly LVGL-specific documentation, we should perhaps just redirect users to their page and not clutter QP's page with it

@shawnfelix
Copy link
Author

And since this mostly LVGL-specific documentation, we should perhaps just redirect users to their page and not clutter QP's page with it

@elpekenin In my project I required a few more steps for adding fonts than what was available from the LVGL docs. I figured that this docs addition would give a useful example for those who go down the LVGL route. Granted, LVGL is probably not frequently used by most.

I guess extra documentation doesnt harm, but on the other hand it makes relevant information harder to find, specially with how bad the search tool sometimes works...

Agreed. The search tool has been the bane of my existence. and it's something I've been thinking about working on. However, I've been told that there are some core changes that are currently in progress before we address major changes to the docs.

With limited amount QMK+LVGL specific information out there it can be tough for newbies to have success with LVGL. I've been doing some note-taking myself and may publish a personal blog post that we could eventually add to the QMK docs.

@elpekenin
Copy link
Contributor

elpekenin commented May 19, 2024

required a few more steps for adding fonts than what was available from the LVGL docs

Sure, im not saying their docs are perfect (i havent ever looked at them, anyway), my point here is that perhaps the missing documentation is more to do with their own docs, not QMK's.

As far as i can tell you only really needed the SRC += in the makefile to get the files compiled (??), but that's again not a QP-specific (or even QMK) thing, but just how the build system works... And having that on the QP page, when it is a much broader thing may not be the best idea.

If you really needed something that wasn't on their docs, for example the LV_FONT_DECLARE macro... that's definitely on them.


Also, took a closer look at your changes now, and while i like having a standarized fonts folder name, where every potential LVGL-enabled keyboard has their code... It may not be the way to word it, as it makes it look like a requirement (while it currently is not)

@shawnfelix
Copy link
Author

As far as i can tell you only really needed the SRC += in the makefile to get the files compiled (??), but that's again not a QP-specific (or even QMK) thing, but just how the build system works... And having that on the QP page, when it is a much broader thing may not be the best idea.

If you really needed something that wasn't on their docs, for example the LV_FONT_DECLARE macro... that's definitely on them.

Good point. Step 3 (modifying the LVGL generated C font file) is also specific to QMK but overall not very difficult to figure out.

It would be nice to have more QMK+LVGL code examples like this PR, but I don't think this addition is the best fit for the QMK docs. QMK+LVGL a niche topic, but still I'm an advocate for more examples/blueprints in the docs

I'll close this and make a blog post elsewhere

Side note: If you're ever interested in QMK+LVGL you can check out my project i've been working on in my fork - develop branch. Building an interactive UI for my keyboard with a whole suite of customizable widgets (macros/games/tools sort of thing) planned out.

@shawnfelix shawnfelix closed this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants