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

Load a smooth font from SPIFFS #112

Closed
vvs551 opened this issue Dec 22, 2018 · 2 comments
Closed

Load a smooth font from SPIFFS #112

vvs551 opened this issue Dec 22, 2018 · 2 comments

Comments

@vvs551
Copy link

vvs551 commented Dec 22, 2018

How to load a smooth font *.vlw from SPIFFS with Display library?
Like TFT_eSPI void loadFont

@komikoni
Copy link

The current M5Stack library does not support Smoothing font.

However, TFT_eSPI imported on screen display supports Smoothing font. For this reason, Smoothing font can be used if you patch a little.
For the contents of the patch, please see below.
Since Japanese is using a large font, I am trying to read from SD card, so please make that part SPIFFS.
https://github.com/komikoni/M5Stack

  String fileName = "MS-Meiryo-24";
  M5.Lcd.loadFont(fileName);
  M5.Lcd.setTextColor(TFT_GREEN, TFT_WHITE);
  M5.Lcd.setCursor(50, 100);
  M5.Lcd.println("ABCABCあいうえお");
  // Display all characters of the font
  M5.Lcd.showFont(200);
  M5.Lcd.unloadFont();  

@komikoni
Copy link

komikoni commented Jan 12, 2019

Supplementary explanation
komikoni@6b47f2e

Below is a copy from TFT_eSPI library.
src/utility/Smooth_font.cpp
src/utility/Smooth_font.h

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

3 participants