All Projects → lvgl → lv_utils

lvgl / lv_utils

Licence: other
Convert images or system fonts to C arrays. Written for LVGL embedded GUI library

Programming Languages

PHP
23972 projects - #3 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to lv utils

XC-OS
Open source graphics operating system for microcontroller
Stars: ✭ 66 (+43.48%)
Mutual labels:  littlevgl, lvgl
lv lib freetype
Interface to FreeType to generate font bitmaps run time
Stars: ✭ 41 (-10.87%)
Mutual labels:  font, lvgl
Cubic-11
免費開源的 11×11 中文點陣體
Stars: ✭ 888 (+1830.43%)
Mutual labels:  font, pixel-font
hyperglot
Hyperglot: a database and tools for detecting language support in fonts
Stars: ✭ 102 (+121.74%)
Mutual labels:  font
HandsomeMod
IOT freedom for end users!
Stars: ✭ 39 (-15.22%)
Mutual labels:  lvgl
bitsnpicas
Bits'N'Picas - Bitmap & Emoji Font Creation & Conversion Tools
Stars: ✭ 171 (+271.74%)
Mutual labels:  font
HiGoogleFonts
HiGoogleFonts allows you to add a Google font picker to easily display a list of Google fonts. The picker shows an instant preview of the font style without loading the font css.
Stars: ✭ 44 (-4.35%)
Mutual labels:  font
qpage
👨‍💻 Free Project For Creating Academic Homepage Without Any Code In 3min
Stars: ✭ 87 (+89.13%)
Mutual labels:  font
lvgl STM32F103 encoder rtx5
LittleVgl test, Custom STM32F103RC breakout Board. ILI9341 display over SPI with DMA. rotary encoder. KEIL RTX v5.
Stars: ✭ 32 (-30.43%)
Mutual labels:  littlevgl
lv lib rlottie
Lottie animation support for LVGL
Stars: ✭ 16 (-65.22%)
Mutual labels:  lvgl
hzk-pixel-font
中文像素字体,12 和 16 像素。
Stars: ✭ 14 (-69.57%)
Mutual labels:  font
FanWunMing
A Simplified-Chinese-to-Traditional-Chinese font based on GenYoMin, which can handle the one-to-many problem | 繁媛明朝是基於源樣明體開發的簡轉繁字型,能處理一簡對多繁
Stars: ✭ 128 (+178.26%)
Mutual labels:  font
FMX.FontAwesome
[FireMonkey] FontAwesome
Stars: ✭ 21 (-54.35%)
Mutual labels:  font
DBSScouterFont
Scouter Language Font as seen in Dragon Ball Super: Broly
Stars: ✭ 21 (-54.35%)
Mutual labels:  font
emoji-extractor-plus
Extract emojis from Apple font in PNG format
Stars: ✭ 42 (-8.7%)
Mutual labels:  font
amiri-typewriter
Mono-width companion to Amiri font family
Stars: ✭ 23 (-50%)
Mutual labels:  font
glfont
A modern opengl text rending library for Golang
Stars: ✭ 27 (-41.3%)
Mutual labels:  font
gridfont
grid-based system for designing simple symbols and fonts. including an example font. mainly intended for plotter drawings.
Stars: ✭ 91 (+97.83%)
Mutual labels:  font
github-code-font-changer
🎨 Change and customize the boring GitHub code viewer font.
Stars: ✭ 52 (+13.04%)
Mutual labels:  font
ifont
🦀 iFont - serverless-based cloud font library
Stars: ✭ 32 (-30.43%)
Mutual labels:  font

Arcihed because both the font converter and the image converter are replaced with more advanced Node.js based converters**

Utilities for use with LVGL

5.3- font converter

The old 5.x font converter (using PHP) was removed in January 2020 as it is no longer compatible with modern versions of LittlevGL. The last commit containing it is ec7d2676b36a27fa13b21162aca1476ad8456ec5.

Overview

This repository houses a number of converter utilities for LittlevGL. Note that the 6.0+ TTF/OTF font converter has its own repository at https://github.com/littlevgl/lv_font_conv.

Here you you can see how they work or download them to run offline.

Get started

This guide shows how to use the converters offline in a command line on Linux

  1. Install PHP: sudo apt-get install php7.2-cli
  2. Intall extensions

2.a For the Image manipulator: sudo apt-get install php7.2-gd

  1. Clone or download the lv_utils repository: git clone https://github.com/littlevgl/lv_utils.git
  2. Go to the lv_utils directory.

For Mac OSX using Homebrew

Because the php version installed by xcode might not have the GD graphics library installed, you need to install the Homebrew version. Once installed, you will need to find where it was installed and reference the complete path to php when running the commands shown on this page. The example below in step 4 happened to be the installation location on my Mac for php version 7.3.3.

  1. Install xcode: install via the app store
  2. Install xcode CLI tools: xcode-select --install
  3. Install PHP: brew install php
  4. Check the install: /usr/local/Cellar/php/7.3.3/bin/php --version
  5. Continue with step 3 in the installation instructions for Linux

Run the Image converter offline

  1. Copy a BMP, JPG or PNG file you want to use into the lv_utils directory
  2. Run the script: php img_conv_core.php "name=wallpaper&img=red_flower.png"
  3. Chek the created C file in lv_utils directory.

The required arguments of the script:

  • name name of the output file and image
  • img an image file

Optional arguments:

  • cf color format. Possible values are: true_color, true_color_alpha, true_color_chroma, indexed_1, indexed_2, indexed_4, indexed_8, alpha_1, alpha_2, alpha_4, alpha_8, raw, raw_alpha, raw_chroma. The default is: true_color.
  • format C array or Binary output. Possible values are: c_array, bin_332, bin_565, bin_565_swap, bin_888. Default is: c_array.

Note: You may need to increase memory_limit in php.ini if PHP reports an error similar to this:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 21570880 bytes) in lv_utils/img_conv_core.php`

Example with all options

Convert a bunny.png with alpha for all pixels to C array: php img_conv_core.php "name=icon&img=bunny.png&format=c_array&cf=true_color_alpha"

Using the generated image in LVGL

  • For C arrays
    • Copy the result C file into your LittlevGL project
    • In a C file of your application declare the image as: extern const lv_img_t my_image_name; or LV_IMG_DECLARE(my_image_name);
    • Set the image for an lv_img object: lv_img_set_src(img1, &my_image_name);
  • For externally binary files (e.g. SD card)
    • Set up a new driver. To learn more read the Tutorial.
    • Set the image for an lv_img object: lv_img_set_src(img1, "S:/path/to/image");
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].