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

Change font size in Yaft #34

Open
wtraylor opened this issue Feb 10, 2024 · 3 comments
Open

Change font size in Yaft #34

wtraylor opened this issue Feb 10, 2024 · 3 comments

Comments

@wtraylor
Copy link

It seems that Yaft currently has its glyphs hardcoded in glyph.h, with a pixel size of 16×32 per glyph.

For the sake of legibility and accessibility a larger font size would be great.

Would it be possible to create generate different glyph sets (larger ones) and switch between them with a configuration parameter?

@wtraylor wtraylor changed the title Change font size Change font size in Yaft Feb 10, 2024
@shawnh-git
Copy link

Config options would be ideal but I'd be happy with just instructions on how to recompile it with a larger font if options aren't possible.

@timower
Copy link
Owner

timower commented Feb 12, 2024

I agree, I won't have time to implement this soon though.
For compiling with your own fonts, it's been a while, but this guide from the original upstream yaft should still work:
https://uobikiemukot.github.io/yaft/#how-to-use-your-favorite-fonts

@mimuki
Copy link

mimuki commented Mar 11, 2024

I was able to confirm that recompiling with fonts generated as per the above link works great :)

Here's a walkthrough of the steps I took since I had some troubles (and maybe other people will as well), but keep in mind I'm a hobbyist who doesn't know what they're doing, so some of these steps may be bad form.

  • make sure you're using cmake >= version 3.19. debian 12's is too old, for example.
  • run which cmake and take note of what it says for later
  • install the right version of the remarkable toolchain for your device version ( https://remarkable.guide/devel/toolchains.html#installer )
  • once installed, source it (at the end of the installer it'll tell you the command you need)
  • clone the non-remarkable yaft repo ( https://github.com/uobikiemukot/yaft )
  • generate your font with a command like ./mkfont_bdf table/alias path/to/your/bdf > glyph.h
  • clone the repo with remarkable yaft in it ( https://github.com/timower/rM2-stuff )
  • copy your glyph.h you generated to vendor/libYaft/glyph.h
    [ you might not need to do this next step, but I did! ]
  • edit the CMakePresets.json so that under the dev preset, CMAKE_BUILD_WITH_INSTALL_RPATH is set to true
  • the version of cmake in the remarkable toolchain is too old, so for all of these commands, replace cmake with the path to cmake you wrote down before:

cmake --preset dev
cmake --build build/dev --target yaft

  • if all went well, copy the build/dev/apps/yaft/yaft file to your remarkable (e.g. scp build/dev/apps/yaft/yaft [email protected]:/home/root/, or however you like to copy your files)
  • for testing, see if it works by running env LD_PRELOAD=/opt/lib/librm2fb_client.so.1.0.1; path/to/yaft- if you see your terminal with the font you picked, it probably works!
  • i have yet to learn the "proper" way to install it so it appears in your launcher, but do that (i bodged it by editing /etc/draft/yaft.draft to point to my yaft instead)
  • hopefully, success?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants