diff --git a/.github/workflows/build_micropython.yml b/.github/workflows/build_micropython.yml index 2608abde4..3f8e56b43 100644 --- a/.github/workflows/build_micropython.yml +++ b/.github/workflows/build_micropython.yml @@ -2,9 +2,9 @@ name: Build Micropython with LVGL submodule on: push: - branches: [ master ] + branches: [ master, dev ] pull_request: - branches: [ master ] + branches: [ master, dev ] jobs: build: diff --git a/.gitignore b/.gitignore index f0da6a113..07070a949 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +scripts/release/__pycache__ **/*.o **/*bin **/*.swp diff --git a/CHANGELOG.md b/CHANGELOG.md index 342e5e3d6..769b18c5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,44 @@ # Changelog -## v7.7.0 (06.10.2020) +## v7.8.0 (20.10.2020) + +### New features +- make DMA2D non blocking + +## v7.7.1 (04.11.2020) +### Bugfixes + +## v7.7.0 (20.10.2020) ### New features - Add PXP GPU support (for NXP MCUs) +- Add VG-Lite GPU support (for NXP MCUs) - Allow max. 16 cell types for table - Add `lv_table_set_text_fmt()` - +- Use margin on calendar header to set distances and padding to the size of the header +- Add `text_sel_bg` style proeprty ### Bugfixes +- Theme update to support text selection background +- Fix imgbtn state change +- Support RTL in table (draw columns right to left) +- Support RTL in pretty layout (draw columns right to left) +- Skip objects in groups if they are in disabled state +- Fix dropdown selection with RTL basedirection +- Fix rectangle border drawing with large width +- Fix `lv_win_clean()` + +## v7.6.1 (06.10.2020) + +### Bugfixes +- Fix BIDI support in dropdown list +- Fix copying base dir in `lv_obj_create` +- Handle sub pixel rendering in font loader +- Fix transitions with style caching +- Fix click focus +- Fix imgbtn image switching with empty style +- Material theme: do not set the text font to allow easy global font change + ## v7.6.0 (22.09.2020) @@ -18,8 +48,6 @@ ### Bugfixes - Fix selection of options with non-ASCII letters in dropdown list - Fix font loader to support LV_FONT_FMT_TXT_LARGE -- Fix BIDI support in dropdown list -- Fix copying base dir in lv_obj_craete ## v7.5.0 (15.09.2020) diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index cbae70459..3a5ccedd5 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -6,6 +6,10 @@ This list indicates only the current intention and can be changed. ## v8 Planned to September/October 2020 +- Create an `lv_components` repository for compley widgets + - It makes the core LVGL leaner + - In `lv_components` we can have a lot and specific widgets + - Good place for contribution - New scrolling: - See [feat/new-scroll](https://github.com/lvgl/lvgl/tree/feat/new-scroll) branch and [#1614](https://github.com/lvgl/lvgl/issues/1614)) issue. - Remove `lv_page` and support scrolling on `lv_obj` @@ -18,10 +22,12 @@ Planned to September/October 2020 - New layouts: - See [#1615](https://github.com/lvgl/lvgl/issues/1615) issue - [CSS Grid](https://css-tricks.com/snippets/css/a-guide-to-grid/)-like layout support - - Work in progress + - [CSS Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)-like layout support + - Remove `lv_cont` and support layouts on `lv_obj` - Simplified File system interface ([feat/new_fs_api](https://github.com/lvgl/lvgl/tree/feat/new-fs-api) branch) to make porting easier - Work in progress - Remove the align parameter from `lv_canvas_draw_text` +- Make the `copy` parameter of `create` functions deprecated ## v8.1 - Add radio button widget @@ -32,10 +38,18 @@ Planned to September/October 2020 - Benchmarking (gem5?). See [#1660](https://github.com/lvgl/lvgl/issues/1660) - Consider direct binary font format support - Remove the copy paramter from create functions +- Style selectors and style-based states See [#1832](https://github.com/lvgl/lvgl/issues/1832) + +## v10 +- Remove property level states + ## Ideas +- 9-patch support for `lv_imgbtn`. +- lv_mem_alloc_aligned(size, align) - Text node. See [#1701](https://github.com/lvgl/lvgl/issues/1701#issuecomment-699479408) -- RGB888 support [#1722](https://github.com/lvgl/lvgl/issues/1722) +- RGB888 support [#1722](https://github.com/lvgl/lvgl/issues/1722) +- Consider ARGB4444, ARGB1555 format - CPP binding. See [Forum](https://forum.lvgl.io/t/is-it-possible-to-officially-support-optional-cpp-api/2736) - Optmize font decompression - Switch to RGBA colors in styles diff --git a/library.json b/library.json index d324347db..e1b2f03d1 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "lvgl", - "version": "7.6.0", + "version": "7.7.1", "keywords": "graphics, gui, embedded, tft, lvgl", "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.", "repository": { diff --git a/library.properties b/library.properties index 3fd5bbc96..ab875456a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=lvgl -version=7.6.0 +version=7.7.1 author=kisvegabor maintainer=kisvegabor,embeddedt,pete-pjb sentence=Full-featured Graphics Library for Embedded Systems diff --git a/lv_conf_template.h b/lv_conf_template.h index 112688290..c1948d8b7 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v7.7.0-dev + * Configuration file for v7.7.1-dev */ /* @@ -205,6 +205,8 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ * */ #define LV_USE_GPU_NXP_PXP_AUTO_INIT 0 +/*1: Use VG-Lite for CPU offload on NXP RTxxx platforms */ +#define LV_USE_GPU_NXP_VG_LITE 0 /* 1: Enable file system (might be required for images */ #define LV_USE_FILESYSTEM 1 @@ -260,9 +262,14 @@ typedef void * lv_img_decoder_user_data_t; /* Define a custom attribute to `lv_disp_flush_ready` function */ #define LV_ATTRIBUTE_FLUSH_READY +/* Required alignment size for buffers */ +#define LV_ATTRIBUTE_MEM_ALIGN_SIZE + /* With size optimization (-Os) the compiler might not align data to - * 4 or 8 byte boundary. This alignment will be explicitly applied where needed. - * E.g. __attribute__((aligned(4))) */ + * 4 or 8 byte boundary. Some HW may need even 32 or 64 bytes. + * This alignment will be explicitly applied where needed. + * LV_ATTRIBUTE_MEM_ALIGN_SIZE should be used to specify required align size. + * E.g. __attribute__((aligned(LV_ATTRIBUTE_MEM_ALIGN_SIZE))) */ #define LV_ATTRIBUTE_MEM_ALIGN /* Attribute to mark large constant arrays for example diff --git a/lvgl.h b/lvgl.h index 7be04f10d..a2d6f3195 100644 --- a/lvgl.h +++ b/lvgl.h @@ -17,7 +17,7 @@ extern "C" { #define LVGL_VERSION_MAJOR 8 #define LVGL_VERSION_MINOR 0 #define LVGL_VERSION_PATCH 0 -#define LVGL_VERSION_INFO "dev" +#define LVGL_VERSION_INFO "" /********************* * INCLUDES diff --git a/scripts/lv_conf_checker.py b/scripts/lv_conf_checker.py index 58cff17c9..a3c63800a 100755 --- a/scripts/lv_conf_checker.py +++ b/scripts/lv_conf_checker.py @@ -27,6 +27,9 @@ fout.write( #define LV_CONF_INTERNAL_H /* clang-format off */ +/*Handle special Kconfig options*/ +#include "lv_conf_kconfig.h" + #include /*If lv_conf.h is not skipped include it*/ diff --git a/scripts/release.py b/scripts/release.py deleted file mode 100755 index b5002b901..000000000 --- a/scripts/release.py +++ /dev/null @@ -1,518 +0,0 @@ -#!/usr/bin/env python - -# Release lvgl, lv_examples, lv_drivers. docs, blog and prepare the development of the next major, minoror bugfix release -# Usage: ./release,py bugfix | minor | major -# The option means what type of versin to prepare for development after release -# -# STEPS: -# - clone all 5 repos -# - get the version numnber from lvgl.h -# - set release branch (e.g. "release/v7") -# - prepare lvgl -# - run lv_conf_internal.py -# - run code formatter -# - clear LVGL_VERSION_INFO (set to "") -# - run Doxygen -# - update the version in lvgl's library.json, library.properties, lv_conf_template.h -# - update CHANGELOG.md -# - commit changes -# - prepare lv_examples -# - upadte the required LVGL version in lv_examples.h (LV_VERSION_CHECK) -# - update the version in lv_ex_conf_template.h -# - prepare lv_drivers -# - update the version in library.json, lv_drv_conf_template.h -# - prepare docs -# - update API XML -# - clear the versiopn info (should be plain vx.y.z) -# - tag all repos with the new version -# - merge to release branches -# - blog: add release post -# - push tags and commits -# - docs: run ./updade.py release/vX -# -# If --patch -# - merge master to dev branches -# - increment patch version by 1 and append "-dev". E.g. "vX.Y.(Z+1)-dev" -# - update version numbers in lvgl and docs -# - commit and push -# - docs: run ./updade.py latest dev -# -# Else (not --patch) -# - merge master to dev -# - merge the dev to master -# - increment version number like "vX.(Y+1).0-dev" -# - apply the new version in dev branches of lvgl, lv_examples, lv_drivers, docs -# - commit and push to dev branches -# - docs: run ./updade.py latest dev - -import re -import os, fnmatch -import os.path -from os import path -from datetime import date -import sys - -upstream_org_url = "https://github.com/lvgl/" -workdir = "./release_tmp" -proj_list = [ "lv_sim_eclipse_sdl"] - -ver_major = -1 -ver_minor = -1 -ver_patch = -1 - -dev_ver_major = -1 -dev_ver_minor = -1 -dev_ver_patch = -1 - -ver_str = "" -dev_ver_str = "" -release_br = "" -release_note = "" - -prepare_type = ['major', 'minor', 'bugfix'] - -dev_prepare = 'minor' - -def upstream(repo): - return upstream_org_url + repo + ".git" - -def cmd(c, exit_on_err = True): - print("\n" + c) - r = os.system(c) - if r: - print("### Error: " + str(r)) - if exit_on_err: exit(int(r)) - -def define_set(fn, name, value): - print("In " + fn + " set " + name + " to " + value) - - new_content = "" - s = r'^ *# *define +' + str(name).rstrip() - - f = open(fn, "r") - for i in f.read().splitlines(): - r = re.search(s, i) - if r: - d = i.split("define") - i = d[0] + "define " + name + " " + value - new_content += i + '\n' - - f.close() - - f = open(fn, "w") - f.write(new_content) - f.close() - -def clone_repos(): - cmd("rm -fr " + workdir) - cmd("mkdir " + workdir) - os.chdir(workdir) - - #For debuging just copy the repos - #cmd("cp -a ../repos/. .") - #return - - cmd("git clone " + upstream("lvgl") + "; cd lvgl; git checkout master; git remote update origin --prune; ") - cmd("git clone " + upstream("lv_examples") + "; cd lv_examples; git checkout master; git remote update origin --prune; ") - cmd("git clone " + upstream("lv_drivers") + "; cd lv_drivers; git checkout master; git remote update origin --prune; ") - cmd("git clone --recurse-submodules " + upstream("docs") + "; cd docs; git checkout master; git remote update origin --prune; ") - cmd("git clone " + upstream("blog") + "; cd blog; git checkout master; git remote update origin --prune; ") - - for p in proj_list: - cmd("git clone " + upstream(p) + " --recurse-submodules ; cd " + p + "; git checkout master; git remote update origin --prune; ") - - -def get_lvgl_version(br): - print("Get LVGL's version") - - global ver_str, ver_major, ver_minor, ver_patch, release_br - - os.chdir("./lvgl") - - cmd("git checkout " + br) - - f = open("./lvgl.h", "r") - - lastNum = re.compile(r'(?:[^\d]*(\d+)[^\d]*)+') - for i in f.read().splitlines(): - r = re.search(r'^#define LVGL_VERSION_MAJOR ', i) - if r: - m = lastNum.search(i) - if m: ver_major = m.group(1) - - r = re.search(r'^#define LVGL_VERSION_MINOR ', i) - if r: - m = lastNum.search(i) - if m: ver_minor = m.group(1) - - r = re.search(r'^#define LVGL_VERSION_PATCH ', i) - if r: - m = lastNum.search(i) - if m: ver_patch = m.group(1) - - f.close() - - cmd("git checkout master") - - ver_str = "v" + str(ver_major) + "." + str(ver_minor) + "." + str(ver_patch) - print("New version:" + ver_str) - - release_br = "release/v" + ver_major - - os.chdir("../") - -def update_version(): - templ = fnmatch.filter(os.listdir('.'), '*templ*') - - if templ[0]: - print("Updating version in " + templ[0]) - cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+/"+ ver_str +"/' " + templ[0]) - - if os.path.exists("library.json"): - print("Updating version in library.json") - cmd("sed -i -r 's/[0-9]+\.[0-9]+\.[0-9]+/"+ ver_str[1:] +"/' library.json") - - if path.exists("library.properties"): - print("Updating version in library.properties") - cmd("sed -i -r 's/version=[0-9]+\.[0-9]+\.[0-9]+/"+ "version=" + ver_str[1:] + "/' library.properties") - -def lvgl_prepare(): - print("Prepare lvgl") - - global ver_str, ver_major, ver_minor, ver_patch - - os.chdir("./lvgl") - define_set("./lvgl.h", "LVGL_VERSION_INFO", '\"\"') - - # Run some scripts - os.chdir("./scripts") - cmd("./code-format.sh") - cmd("./lv_conf_checker.py") - cmd("doxygen") - os.chdir("../") - - update_version() - - #update CHANGLELOG - new_content = "" - f = open("./CHANGELOG.md", "r") - - global release_note - release_note = "" - note_state = 0 - for i in f.read().splitlines(): - if note_state == 0: - r = re.search(r'^## ' + ver_str, i) - if r: - i = i.replace("planned on ", "") - note_state+=1 - - elif note_state == 1: - r = re.search(r'^## ', i) - if r: - note_state+=1 - else: - release_note += i + '\n' - - new_content += i + '\n' - - f.close() - - f = open("./CHANGELOG.md", "w") - f.write(new_content) - f.close() - - cmd('git commit -am "prepare to release ' + ver_str + '"') - - os.chdir("../") - - -def lv_examples_prepare(): - print("Prepare lv_examples") - global ver_str, ver_major, ver_minor, ver_patch - - os.chdir("./lv_examples") - - update_version() - - cmd("sed -i -r 's/LV_VERSION_CHECK\([0-9]+, *[0-9]+, *[0-9]+\)/"+ "LV_VERSION_CHECK(" + ver_major + ", " + ver_minor + ", " + ver_patch + ")/' lv_examples.h") - - cmd('git commit -am "prepare to release ' + ver_str + '"') - - os.chdir("../") - -def lv_drivers_prepare(): - print("Prepare lv_drivers") - global ver_str, ver_major, ver_minor, ver_patch - - os.chdir("./lv_drivers") - - update_version() - - cmd('git commit -am "prepare to release ' + ver_str + '"') - - os.chdir("../") - -def docs_prepare(): - print("Prepare docs") - global ver_str, ver_major, ver_minor, ver_patch - - os.chdir("./docs") - - cmd("git co latest --") - cmd("rm -rf xml"); - cmd("cp -r ../lvgl/docs/api_doc/xml ."); - cmd("git add xml"); - - cmd("sed -i -r \"s/'v[0-9]+\.[0-9]+\.[0-9]+.*'/\'" + ver_str + "'/\" conf.py") - - cmd('git commit -am "prepare to release ' + ver_str + '"') - - os.chdir("../") - -def blog_add_post(): - global ver_str, release_note - - os.chdir("./blog/_posts") - - post = "---\nlayout: post\ntitle: " + ver_str + " is released\nauthor: \"kisvegabor\"\ncover: /assets/release_cover.png\n---\n\n" - post += release_note - - today = date.today() - d = today.strftime("%Y-%m-%d") - - f = open(d + "-release_" + ver_str + ".md", "w") - f.write(post) - f.close() - - cmd("git add .") - cmd("git commit -am 'Add " + ver_str + " release post'") - - os.chdir("../../") - -def add_tags(): - global ver_str - tag_cmd = " git tag -a " + ver_str + " -m 'Release " + ver_str + "' " - cmd("cd lvgl; " + tag_cmd) - cmd("cd lv_examples; " + tag_cmd) - cmd("cd lv_drivers; " + tag_cmd) - cmd("cd docs; " + tag_cmd) - -def update_release_branches(): - global release_br - merge_cmd = " git checkout " + release_br + "; git pull origin " + release_br + "; git merge master -X ours; git push origin " + release_br + "; git checkout master" - cmd("cd lvgl; " + merge_cmd) - cmd("cd lv_examples; " + merge_cmd) - cmd("cd lv_drivers; " + merge_cmd) - - merge_cmd = " git checkout " + release_br + "; git pull origin " + release_br + "; git merge latest -X ours; git push origin " + release_br + "; git checkout latest" - cmd("cd docs; " + merge_cmd) - -def publish_master(): - - #Merge LVGL master to dev first to avoid "merge-to-dev.yml" running asynchronous - os.chdir("./lvgl") - cmd("git checkout dev") - cmd("git merge master -X ours") - cmd("git add .") - cmd("git commit -am 'Merge master'", False) - cmd("git push origin dev") - cmd("git checkout master") - os.chdir("../") - - pub_cmd = "git push origin master; git push origin " + ver_str - cmd("cd lvgl; " + pub_cmd) - cmd("cd lv_examples; " + pub_cmd) - cmd("cd lv_drivers; " + pub_cmd) - - pub_cmd = "git push origin master" - cmd("cd blog; " + pub_cmd) - -def merge_from_dev(): - merge_cmd = "git checkout master; git merge dev;" - cmd("cd lvgl; " + merge_cmd) - - merge_cmd = "git checkout latest -- ; git merge dev -X theirs --no-edit;" - cmd("cd docs; " + merge_cmd) - - -def lvgl_update_master_version(): - global ver_major, ver_minor, ver_patch, ver_str - - os.chdir("./lvgl") - - cmd("git checkout master") - define_set("./lvgl.h", "LVGL_VERSION_MAJOR", ver_major) - define_set("./lvgl.h", "LVGL_VERSION_MINOR", ver_minor) - define_set("./lvgl.h", "LVGL_VERSION_PATCH", ver_patch) - define_set("./lvgl.h", "LVGL_VERSION_INFO", "dev") - - templ = fnmatch.filter(os.listdir('.'), '*templ*') - if templ[0]: - print("Updating version in " + templ[0]) - cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+.*/"+ ver_str +"/' " + templ[0]) - - - cmd("git commit -am 'Update version'") - - os.chdir("../") - -def docs_update_latest_version(): - global ver_str - - os.chdir("./docs") - cmd("git checkout latest --") - cmd("sed -i -r \"s/'v[0-9]+\.[0-9]+\.[0-9]+.*'/\'" + ver_str + "'/\" conf.py") - cmd("git commit -am 'Update version'") - cmd("git checkout master --") - - os.chdir("../") - - -def lvgl_update_dev_version(): - global ver_major, ver_minor, ver_patch, dev_ver_str - - os.chdir("./lvgl") - - cmd("git checkout dev") - define_set("./lvgl.h", "LVGL_VERSION_MAJOR", str(ver_major)) - define_set("./lvgl.h", "LVGL_VERSION_MINOR", str(ver_minor)) - define_set("./lvgl.h", "LVGL_VERSION_PATCH", str(ver_patch)) - define_set("./lvgl.h", "LVGL_VERSION_INFO", "\"dev\"") - - templ = fnmatch.filter(os.listdir('.'), '*templ*') - if templ[0]: - print("Updating version in " + templ[0]) - cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+.*/"+ dev_ver_str +"/' " + templ[0]) - - - cmd("git commit -am 'Update dev version'") - cmd("git checkout master") - - os.chdir("../") - -def docs_update_dev_version(): - global dev_ver_str - - os.chdir("./docs") - cmd("git checkout dev --") - cmd("sed -i -r \"s/'v[0-9]+\.[0-9]+\.[0-9]+.*'/\'" + dev_ver_str + "'/\" conf.py") - cmd("git commit -am 'Update dev version'") - cmd("git checkout master --") - - os.chdir("../") - - -def publish_dev_and_master(): - pub_cmd = "git checkout dev; git push origin dev" - cmd("cd lvgl; " + pub_cmd) - pub_cmd = "git checkout master; git push origin master" - cmd("cd lvgl; " + pub_cmd) - -def projs_update(): - global proj_list, release_br, ver_str - for p in proj_list: - os.chdir("./" + p) - cmd('git checkout master') - print(p + ": upadte lvgl"); - cmd("cd lvgl; git co " + release_br + "; git pull origin " + release_br) - cmd("cp -f lvgl/lv_conf_template.h lv_conf.h") - cmd("sed -i -r 's/#if 0/#if 1/' lv_conf.h") # Enable lv_conf.h - d = {} - with open("confdef.txt") as f: - for line in f: - (key, val) = line.rstrip().split('\t') - d[key] = val - - for k,v in d.items(): - define_set("lv_conf.h", str(k), str(v)) - - if os.path.exists("lv_examples"): - print(p + ": upadte lv_examples"); - cmd("cd lv_examples; git co " + release_br + "; git pull origin " + release_br) - - if os.path.exists("lv_drivers"): - print(p + ": upadte lv_drivers"); - cmd("cd lv_drivers " + release_br + "; git pull origin " + release_br) - - msg = 'Update to ' + ver_str - cmd("git add .") - cmd('git commit -am "' + msg + '"') - cmd('git push origin master') - cmd("git tag -a " + ver_str + " -m '" + msg + "' " ) - cmd('git push origin ' + ver_str) - - os.chdir("../") - -def docs_update_all(): - cmd("cd docs; git checkout master; python 2.7 ./update.py master dev " + release_br) - -def cleanup(): - os.chdir("../") - cmd("rm -fr " + workdir) - -if __name__ == '__main__': - dev_prepare = 'bugfix' - if(len(sys.argv) != 2): - print("Missing argument. Usage ./release.py bugfix | minor | major") - print("Use minor by deafult") - else: - dev_prepare = sys.argv[1] - - if not (dev_prepare in prepare_type): - print("Invalid argument. Usage ./release.py bugfix | minor | major") - exit(1) - - clone_repos() - get_lvgl_version("dev") - dev_ver_major = ver_major - dev_ver_minor = ver_minor - dev_ver_patch = ver_patch - dev_ver_str = ver_str - - get_lvgl_version("master") - - lvgl_prepare() - lv_examples_prepare() - lv_drivers_prepare() - docs_prepare() - blog_add_post() - add_tags() - update_release_branches() - publish_master() - - projs_update() - - if dev_prepare == 'bugfix': - ver_patch = str(int(ver_patch) + 1) - ver_str = "v" + ver_major + "." + ver_minor + "." + ver_patch + "-dev" - - print("Prepare bugfix version " + ver_str) - - lvgl_update_master_version() - docs_update_latest_version() - - else: - #merge_from_dev() - - get_lvgl_version("master") - - if dev_prepare == 'minor': - ver_minor = str(int(ver_minor) + 1) - ver_patch = "0" - else: - ver_major = str(int(ver_major) + 1) - ver_minor = "0" - ver_patch = "0" - - dev_ver_str = "v" + str(ver_major) + "." + str(ver_minor) + "." + str(ver_patch) + "-dev" - - print("Prepare minor version " + dev_ver_str) - - lvgl_update_dev_version() - docs_update_dev_version() - publish_dev_and_master() - - docs_update_all(); - cleanup() - diff --git a/scripts/release/com.py b/scripts/release/com.py new file mode 100755 index 000000000..d4abb2868 --- /dev/null +++ b/scripts/release/com.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python + +import sys +import os.path +from os import path +import os, fnmatch +import re +import subprocess +import com + +def cmd(c, ask_on_err = True): + print("\n" + c) + r = os.system(c) + if r: + print("### Error: " + str(r)) + if exit_on_err: + input("Press Enter to continue exectution...") + +def define_set(fn, name, value): + print("In " + fn + " set " + name + " to " + value) + + new_content = "" + s = r'^ *# *define +' + str(name).rstrip() + ' +' + + f = open(fn, "r") + for i in f.read().splitlines(): + r = re.search(s, i) + if r: + d = i.split("define") + i = d[0] + "define " + name + " " + value + new_content += i + '\n' + + f.close() + + f = open(fn, "w") + f.write(new_content) + f.close() + +def ver_format(ver): + s = "v" + str(ver[0]) + "." + str(ver[1]) + "." + str(ver[2]) + if(ver[3] != ""): s = s + "-" + ver[3] + return s + +def get_lvgl_version(br): + print("Get LVGL's version") + + ver = [0, 0, 0, ""] + + os.chdir("./lvgl") + + com.cmd("git checkout " + br) + + f = open("./lvgl.h", "r") + + lastNum = re.compile(r'(?:[^\d]*(\d+)[^\d]*)+') + for i in f.read().splitlines(): + r = re.search(r'^#define LVGL_VERSION_MAJOR ', i) + if r: + m = lastNum.search(i) + if m: ver[0] = m.group(1) + + r = re.search(r'^#define LVGL_VERSION_MINOR ', i) + if r: + m = lastNum.search(i) + if m: ver[1] = m.group(1) + + r = re.search(r'^#define LVGL_VERSION_PATCH ', i) + if r: + m = lastNum.search(i) + if m: ver[2] = m.group(1) + + f.close() + + com.cmd("git checkout master") + + os.chdir("../") + return ver + +def push(c): + return + cmd(c) + +def update_version(ver): + ver_str = ver_format(ver) + ver_num = ver[0] + "." + ver[1] + "." + ver[2] + + templ = fnmatch.filter(os.listdir('.'), '*_templ*.h') + + if len(templ) > 0 and templ[0]: + print("Updating version in " + templ[0]) + cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+/"+ "v" + ver_num + "/' " + templ[0]) + + if os.path.exists("library.json"): + print("Updating version in library.json") + cmd("sed -i -r 's/[0-9]+\.[0-9]+\.[0-9]+/"+ ver_num +"/' library.json") + + if path.exists("library.properties"): + print("Updating version in library.properties") + cmd("sed -i -r 's/version=[0-9]+\.[0-9]+\.[0-9]+/"+ "version=" + ver_num + "/' library.properties") + + if path.exists("conf.py"): + cmd("sed -i -r \"s/'v[0-9]+\.[0-9]+\.[0-9]+.*'/\'" + ver_str + "'/\" conf.py") + + if path.exists("lvgl.h"): + define_set("./lvgl.h", "LVGL_VERSION_MAJOR", str(ver[0])) + define_set("./lvgl.h", "LVGL_VERSION_MINOR", str(ver[1])) + define_set("./lvgl.h", "LVGL_VERSION_PATCH", str(ver[2])) + define_set("./lvgl.h", "LVGL_VERSION_INFO", "\"" + ver[3] + "\"") + diff --git a/scripts/release/dev.py b/scripts/release/dev.py new file mode 100755 index 000000000..42cfd6a5e --- /dev/null +++ b/scripts/release/dev.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python + +import re +import os, fnmatch +import os.path +from os import path +from datetime import date +import com + +def lvgl_upadte_ver(ver, br): + os.chdir("./lvgl") + + com.cmd("git checkout " + br) + com.update_version(ver) + com.cmd("git commit -am 'Update " + br + " version'") + com.push("origin " + br) + com.cmd("git checkout master") + + os.chdir("../") + +def docs_update_ver(ver, br): + os.chdir("./docs") + com.cmd("git checkout " + br + " --") + com.update_version(ver) + com.cmd("git commit -am 'Update " + br + " version'") + com.push("origin " + br) + com.cmd("git checkout master --") + + os.chdir("../") + + +def merge_dev_to_master(): + os.chdir("./lvgl") + com.cmd("git checkout master") + com.cmd("git merge dev") + com.push("origin master") + os.chdir("../") + + os.chdir("./docs") + com.cmd("git checkout dev -- ") #'dev' sometimes is not recognized so switch to it first + com.cmd("git checkout latest --") + com.cmd("git merge dev -X theirs --no-edit;") + com.push("origin latest") + os.chdir("../") + + +def make(mode): + ver = com.get_lvgl_version("dev") + ver[3] = "dev" + if(mode == "bugfix"): + ver[2] = ver[2] + 1 + lvgl_update_ver(ver, "master") + docs_update_ver(ver, "latest") + else: + merge_dev_to_master() + if(mode == "major"): + ver[0] = str(int(ver[0]) + 1) + ver[1] = '0' + ver[2] = '0' + if(mode == "minor"): + ver[1] = str(int(ver[1]) + 1) + ver[2] = '0' + + lvgl_upadte_ver(ver, "dev") + docs_update_ver(ver, "dev") + + + +if __name__ == '__main__': + if(len(sys.argv) != 2): + print("Missing argument. Usage ./dev.py major | minor | bugfix") + print("E.g. ./dev.py minor") + else: + make(sys.argv[1]) diff --git a/scripts/release/main.py b/scripts/release/main.py new file mode 100755 index 000000000..8d329d471 --- /dev/null +++ b/scripts/release/main.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +import os.path +from os import path +from datetime import date +import sys +import com +import release +import dev +import proj + +upstream_org_url = "https://github.com/lvgl/" +workdir = "./release_tmp" +proj_list = [ "lv_sim_eclipse_sdl", "lv_sim_emscripten"] + +def upstream(repo): + return upstream_org_url + repo + ".git" + +def clone(repo): + com.cmd("git clone --recurse-submodules " + upstream(repo)) + os.chdir("./" + repo) + com.cmd("git checkout master") + com.cmd("git remote update origin --prune") + com.cmd("git pull origin --tags") + os.chdir("..") + +def clone_repos(): + com.cmd("rm -fr " + workdir) + com.cmd("mkdir " + workdir) + os.chdir(workdir) + clone("lvgl") + clone("lv_examples") + clone("lv_drivers") + clone("docs") + clone("blog") + + for p in proj_list: + clone(p) + +def cleanup(): + os.chdir("../") + com.cmd("rm -fr " + workdir) + +if __name__ == '__main__': + prepare_type = ['major', 'minor', 'bugfix'] + dev_prepare = 'minor' + +# if(len(sys.argv) != 2): +# print("Missing argument. Usage ./release.py bugfix | minor | major") +# print("Use minor by deafult") +# else: +# dev_prepare = sys.argv[1] + + if not (dev_prepare in prepare_type): + print("Invalid argument. Usage ./release.py bugfix | minor | major") + exit(1) + + clone_repos() + release.make() + for p in proj_list: + proj.make(p, True) + + dev.make(dev_prepare) + #cleanup() diff --git a/scripts/release/proj.py b/scripts/release/proj.py new file mode 100755 index 000000000..db02cd537 --- /dev/null +++ b/scripts/release/proj.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +import sys +import os.path +from os import path +import re +import subprocess +import com + + +def make(repo_path, auto_push = False): + os.chdir("./" + repo_path) + com.cmd('git checkout master') + print("Upadte lvgl"); + os.chdir("./lvgl") + com.cmd("git checkout master") + com.cmd("git pull origin --tags") + + out = subprocess.Popen(['git', 'tag', '--sort=-creatordate'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + stdout,stderr = out.communicate() + + ver_str = stdout.decode("utf-8").split('\n')[0] + release_br = ver_str[1:] #trim "v" + release_br = release_br.split('.')[0] # get the first number + release_br = "release/v" + release_br + + com.cmd("git checkout " + release_br + "; git pull origin " + release_br) + + os.chdir("..") + + com.cmd("cp -f lvgl/lv_conf_template.h lv_conf.h") + com.cmd("sed -i -r 's/#if 0/#if 1/' lv_conf.h") # Enable lv_conf.h + with open("confdef.txt") as f: + for line in f: + (key, val) = line.rstrip().split('\t') + com.define_set("lv_conf.h", str(key), str(val)) + + + if os.path.exists("lv_examples"): + print("Upadte lv_examples"); + com.cmd("cd lv_examples; git co " + release_br + "; git pull origin " + release_br) + + if os.path.exists("lv_drivers"): + print("upadte lv_drivers"); + com.cmd("cd lv_drivers " + release_br + "; git pull origin " + release_br) + + msg = 'Update to ' + ver_str + com.cmd("git add .") + com.cmd('git commit -am "' + msg + '"') + com.cmd("git tag -a " + ver_str + " -m '" + msg + "' " ) + if auto_push: + com.push("origin --tags") + com.push("origin master") + + os.chdir("../") + +if __name__ == '__main__': + if(len(sys.argv) != 2): + print("Missing argument. Usage ./projs_update.py repo_path") + print("E.g. ./projs_update.py ./lv_sim_eclipse_sdl") + else: + make(sys.argv[1], sys.argv[2]) diff --git a/scripts/release/release.py b/scripts/release/release.py new file mode 100755 index 000000000..edcdf79e4 --- /dev/null +++ b/scripts/release/release.py @@ -0,0 +1,173 @@ +#!/usr/bin/env python + +import os.path +from os import path +from datetime import date +import sys +import com +import re + +def update_release_branch(release_br, master_br = "master"): + com.cmd("git checkout " + release_br) + com.cmd("git pull origin " + release_br) + com.cmd("git merge "+ master_br +" -X ours"); + com.push("origin " + release_br); + com.cmd("git checkout master"); + +def lvgl_release(ver): + print("Release lvgl") + + ver_str = com.ver_format(ver) + release_br = "release/v" + str(ver[0]) + + os.chdir("./lvgl") + com.define_set("./lvgl.h", "LVGL_VERSION_INFO", '\"\"') + + # Run some scripts + os.chdir("./scripts") + com.cmd("./code-format.sh") + com.cmd("./lv_conf_checker.py") + com.cmd("doxygen") + os.chdir("../") + + com.update_version(ver) + + #update CHANGLELOG + new_content = "" + f = open("./CHANGELOG.md", "r") + + release_note = "" + note_state = 0 + for i in f.read().splitlines(): + if note_state == 0: + r = re.search(r'^## ' + ver_str, i) + if r: + i = i.replace("planned on ", "") + note_state+=1 + + elif note_state == 1: + r = re.search(r'^## ', i) + if r: + note_state+=1 + else: + release_note += i + '\n' + + new_content += i + '\n' + + f.close() + + f = open("./CHANGELOG.md", "w") + f.write(new_content) + f.close() + + com.cmd('git commit -am "Release ' + ver_str + '"') + + com.cmd('git checkout dev') + com.cmd("git merge master -X ours") + com.cmd("git add .") + com.cmd("git commit -am 'Merge master'", False) + com.push('origin dev') + com.cmd('git checkout master') + com.cmd("git tag -a " + ver_str + " -m 'Release " + ver_str + "' ") + com.push('origin master') + com.push('origin --tags') + + update_release_branch(release_br) + + os.chdir("../") + + return release_note + + +def lv_examples_release(ver): + print("Release lv_examples") + + os.chdir("./lv_examples") + release_br = "release/v" + str(ver[0]) + ver_str = com.ver_format(ver) + + com.update_version(ver) + + com.cmd("sed -i -r 's/LV_VERSION_CHECK\([0-9]+, *[0-9]+, *[0-9]+\)/"+ "LV_VERSION_CHECK(" + str(ver[0]) + ", " + str(ver[1]) + ", " + str(ver[2]) + ")/' lv_examples.h") + + com.cmd('git commit -am "Release ' + ver_str + '"') + com.cmd("git tag -a " + ver_str + " -m 'Release " + ver_str + "' ") + com.push('origin master') + com.push('origin --tags') + + os.chdir("../") + +def lv_drivers_release(ver): + print("Release lv_drivers") + + os.chdir("./lv_drivers") + release_br = "release/v" + str(ver[0]) + ver_str = com.ver_format(ver) + + com.update_version(ver) + + com.cmd('git commit -am "Release ' + ver_str + '"') + com.cmd("git tag -a " + ver_str + " -m 'Release " + ver_str + "' ") + com.push('origin master') + com.push('origin --tags') + + update_release_branch(release_br) + + os.chdir("../") + +def docs_release(ver): + print("Release docs") + + os.chdir("./docs") + release_br = "release/v" + str(ver[0]) + ver_str = com.ver_format(ver) + + com.cmd("git co latest --") + com.cmd("rm -rf xml"); + com.cmd("cp -r ../lvgl/docs/api_doc/xml ."); + com.cmd("git add xml"); + + com.update_version(ver) + + com.cmd('git commit -am "Release ' + ver_str + '"') + com.cmd("git tag -a " + ver_str + " -m 'Release " + ver_str + "' ") + com.push('origin master') + com.push('origin --tags') + + update_release_branch(release_br, "latest") + + os.chdir("../") + +def blog_release(ver, release_note): + + os.chdir("./blog/_posts") + + ver_str = com.ver_format(ver) + + post = "---\nlayout: post\ntitle: " + ver_str + " is released\nauthor: \"kisvegabor\"\ncover: /assets/release_cover.png\n---\n\n" + post += release_note + + today = date.today() + d = today.strftime("%Y-%m-%d") + + f = open(d + "-release_" + ver_str + ".md", "w") + f.write(post) + f.close() + + com.cmd("git add .") + com.cmd("git commit -am 'Add " + ver_str + " release post'") + com.push('origin master') + + os.chdir("../../") + + +def make(): + ver = com.get_lvgl_version("master") + release_note = lvgl_release(ver) + lv_examples_release(ver) + lv_drivers_release(ver) + docs_release(ver) + blog_release(ver, release_note) + +if __name__ == '__main__': + make() diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index 487cecdb7..1684ba6be 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -25,8 +25,12 @@ # endif #endif + /* clang-format off */ +/*Handle special Kconfig options*/ +#include "lv_conf_kconfig.h" + #include /*==================== @@ -478,7 +482,11 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ /*1: Use PXP for CPU off-load on NXP RTxxx platforms */ #ifndef LV_USE_GPU_NXP_PXP -#define LV_USE_GPU_NXP_PXP 0 +# ifdef CONFIG_LV_USE_GPU_NXP_PXP +# define LV_USE_GPU_NXP_PXP CONFIG_LV_USE_GPU_NXP_PXP +# else +# define LV_USE_GPU_NXP_PXP 0 +# endif #endif /*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c) @@ -487,7 +495,20 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ *0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init() * */ #ifndef LV_USE_GPU_NXP_PXP_AUTO_INIT -#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0 +# ifdef CONFIG_LV_USE_GPU_NXP_PXP_AUTO_INIT +# define LV_USE_GPU_NXP_PXP_AUTO_INIT CONFIG_LV_USE_GPU_NXP_PXP_AUTO_INIT +# else +# define LV_USE_GPU_NXP_PXP_AUTO_INIT 0 +# endif +#endif + +/*1: Use VG-Lite for CPU offload on NXP RTxxx platforms */ +#ifndef LV_USE_GPU_NXP_VG_LITE +# ifdef CONFIG_LV_USE_GPU_NXP_VG_LITE +# define LV_USE_GPU_NXP_VG_LITE CONFIG_LV_USE_GPU_NXP_VG_LITE +# else +# define LV_USE_GPU_NXP_VG_LITE 0 +# endif #endif /* 1: Enable file system (might be required for images */ @@ -614,9 +635,20 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ # endif #endif +/* Required alignment size for buffers */ +#ifndef LV_ATTRIBUTE_MEM_ALIGN_SIZE +# ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE +# define LV_ATTRIBUTE_MEM_ALIGN_SIZE CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE +# else +# define LV_ATTRIBUTE_MEM_ALIGN_SIZE +# endif +#endif + /* With size optimization (-Os) the compiler might not align data to - * 4 or 8 byte boundary. This alignment will be explicitly applied where needed. - * E.g. __attribute__((aligned(4))) */ + * 4 or 8 byte boundary. Some HW may need even 32 or 64 bytes. + * This alignment will be explicitly applied where needed. + * LV_ATTRIBUTE_MEM_ALIGN_SIZE should be used to specify required align size. + * E.g. __attribute__((aligned(LV_ATTRIBUTE_MEM_ALIGN_SIZE))) */ #ifndef LV_ATTRIBUTE_MEM_ALIGN # ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN # define LV_ATTRIBUTE_MEM_ALIGN CONFIG_LV_ATTRIBUTE_MEM_ALIGN @@ -1265,7 +1297,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ /* Support bidirectional texts. * Allows mixing Left-to-Right and Right-to-Left texts. - * The direction will be processed according to the Unicode Bidirectional Algorithm: + * The direction will be processed according to the Unicode Bidirectioanl Algorithm: * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/ #ifndef LV_USE_BIDI # ifdef CONFIG_LV_USE_BIDI @@ -1680,7 +1712,15 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ # define LV_TABLE_COL_MAX 12 # endif #endif +#ifndef LV_TABLE_CELL_STYLE_CNT +# ifdef CONFIG_LV_TABLE_CELL_STYLE_CNT +# define LV_TABLE_CELL_STYLE_CNT CONFIG_LV_TABLE_CELL_STYLE_CNT +# else +# define LV_TABLE_CELL_STYLE_CNT 4 +# endif #endif +#endif + /*================== * Non-user section diff --git a/src/lv_conf_kconfig.h b/src/lv_conf_kconfig.h new file mode 100644 index 000000000..e1e0b6a9f --- /dev/null +++ b/src/lv_conf_kconfig.h @@ -0,0 +1,294 @@ +/** + * @file lv_conf_kconfig.h + * Configs that needs special handling when LVGL is used with Kconfig + */ + +#ifndef LV_CONF_KCONFIG_H +#define LV_CONF_KCONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif + +/******************* + * THEME SELECTION + *******************/ + +#ifndef LV_THEME_DEFAULT_INIT + #if defined (CONFIG_LV_THEME_DEFAULT_INIT_EMPTY) + #define LV_THEME_DEFAULT_INIT lv_theme_empty_init + #elif defined (CONFIG_LV_THEME_DEFAULT_INIT_TEMPLATE) + #define LV_THEME_DEFAULT_INIT lv_theme_template_init + #elif defined (CONFIG_LV_THEME_DEFAULT_INIT_MATERIAL) + #define LV_THEME_DEFAULT_INIT lv_theme_material_init + #elif defined (CONFIG_LV_THEME_DEFAULT_INIT_MONO) + #define LV_THEME_DEFAULT_INIT lv_theme_mono_init + #endif +#endif + +/******************* + * COLOR SELECTION + *******************/ + +#ifdef LV_THEME_DEFAULT_COLOR_PRIMARY + #ifdef CONFIG_LV_THEME_DEFAULT_COLOR_PRIMARY + #define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(CONFIG_LV_THEME_DEFAULT_COLOR_PRIMARY) + #endif +#endif + +#ifdef LV_THEME_DEFAULT_COLOR_SECONDARY + #ifdef CONFIG_LV_THEME_DEFAULT_COLOR_SECONDARY + #define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(CONFIG_LV_THEME_DEFAULT_COLOR_SECONDARY) + #endif +#endif + +/******************** + * FONT SELECTION + *******************/ + +/* NOTE: In Kconfig instead of `LV_THEME_DEFAULT_FONT_SMALL` + * `CONFIG_LV_THEME_DEFAULT_FONT_SMALL_` is defined + * hence the large selection with if-s + */ + +/*------------------ + * SMALL FONT + *-----------------*/ +#ifndef LV_THEME_DEFAULT_FONT_SMALL + #if defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_8 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_8 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_10 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_10 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_12 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_14 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_14 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_16 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_18 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_18 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_20 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_20 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_22 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_22 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_24 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_24 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_26 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_28 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_30 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_30 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_32 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_32 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_34 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_34 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_36 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_36 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_38 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_38 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_40 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_40 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_42 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_42 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_44 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_44 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_46 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_46 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_48 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_48 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_UNSCII_8 + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_unscii_8 + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT12SUBPX + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_12_subpx + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT28COMPRESSED + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_28_compressed + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_DEJAVU_16_PERSIAN_HEBREW + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_dejavu_16_persian_hebrew + #elif defined CONFIG_LV_FONT_DEFAULT_SMALL_SIMSUN_16_CJK + #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_simsun_16_cjk + #endif +#endif + +/*------------------ + * NORMAL FONT + *-----------------*/ +#ifndef LV_THEME_DEFAULT_FONT_NORMAL + #if defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_8 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_8 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_10 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_10 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_12 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_12 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_14 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_14 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_16 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_16 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_18 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_18 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_20 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_20 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_22 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_22 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_24 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_24 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_26 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_26 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_28 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_28 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_30 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_30 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_32 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_32 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_34 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_34 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_36 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_36 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_38 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_38 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_40 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_40 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_42 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_42 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_44 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_44 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_46 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_46 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_48 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_48 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_UNSCII_8 + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_unscii_8 + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT12SUBPX + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_12_subpx + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT28COMPRESSED + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_28_compressed + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_DEJAVU_16_PERSIAN_HEBREW + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_dejavu_16_persian_hebrew + #elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_SIMSUN_16_CJK + #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_simsun_16_cjk + #endif +#endif + +/*------------------ + * SUBTITLE FONT + *-----------------*/ +#ifndef LV_THEME_DEFAULT_FONT_SUBTITLE + #if defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_8 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_8 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_10 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_10 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_12 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_12 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_14 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_14 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_16 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_16 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_18 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_18 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_20 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_20 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_22 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_22 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_24 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_24 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_26 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_26 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_28 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_28 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_30 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_30 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_32 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_32 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_34 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_34 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_36 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_36 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_38 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_38 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_40 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_40 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_42 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_42 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_44 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_44 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_46 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_46 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_48 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_48 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_UNSCII_8 + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_unscii_8 + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT12SUBPX + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_12_subpx + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT28COMPRESSED + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_28_compressed + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_DEJAVU_16_PERSIAN_HEBREW + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_dejavu_16_persian_hebrew + #elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_SIMSUN_16_CJK + #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_simsun_16_cjk + #endif +#endif + +/*------------------ + * TITLE FONT + *-----------------*/ +#ifndef LV_THEME_DEFAULT_FONT_TITLE + #if defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_8 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_8 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_10 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_10 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_12 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_12 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_14 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_14 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_16 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_16 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_18 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_18 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_20 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_20 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_22 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_22 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_24 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_24 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_26 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_26 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_28 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_28 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_30 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_30 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_32 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_32 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_34 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_34 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_36 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_36 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_38 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_38 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_40 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_40 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_42 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_42 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_44 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_44 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_46 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_46 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_48 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_48 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_UNSCII_8 + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_unscii_8 + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT12SUBPX + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_12_subpx + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT28COMPRESSED + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_28_compressed + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_DEJAVU_16_PERSIAN_HEBREW + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_dejavu_16_persian_hebrew + #elif defined CONFIG_LV_FONT_DEFAULT_TITLE_SIMSUN_16_CJK + #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_simsun_16_cjk + #endif +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_CONF_KCONFIG_H*/ diff --git a/src/lv_core/lv_disp.c b/src/lv_core/lv_disp.c index 10536d176..ea4a87003 100644 --- a/src/lv_core/lv_disp.c +++ b/src/lv_core/lv_disp.c @@ -316,12 +316,6 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t */ uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp) { - if(!disp) disp = lv_disp_get_default(); - if(!disp) { - LV_LOG_WARN("lv_disp_get_inactive_time: no display registered"); - return 0; - } - if(disp) return lv_tick_elaps(disp->last_activity_time); lv_disp_t * d; diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 78d3c8d67..78fe73ea7 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -484,6 +484,7 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) can_move = true; if(obj_next == NULL) continue; + if(lv_obj_get_state(*obj_next) & LV_STATE_DISABLED) continue; /*Hidden objects don't receive focus*/ if(lv_obj_has_flag(*obj_next, LV_OBJ_FLAG_HIDDEN) == false) break; diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index a1063270f..e3d53935f 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1084,14 +1084,14 @@ static void indev_click_focus(lv_indev_proc_t * proc) if(lv_obj_has_flag(indev_obj_act, LV_OBJ_FLAG_CLICK_FOCUSABLE) && proc->types.pointer.last_pressed != obj_to_focus) { #if LV_USE_GROUP - lv_group_t * g_act = lv_obj_get_group(indev_obj_act); + lv_group_t * g_act = lv_obj_get_group(obj_to_focus); lv_group_t * g_prev = proc->types.pointer.last_pressed ? lv_obj_get_group(proc->types.pointer.last_pressed) : NULL; /*If both the last and act. obj. are in the same group (or no group but it's also the same) */ if(g_act == g_prev) { /*The objects are in a group*/ if(g_act) { - lv_group_focus_obj(indev_obj_act); + lv_group_focus_obj(obj_to_focus); if(indev_reset_check(proc)) return; } /*The object are not in group*/ @@ -1140,7 +1140,7 @@ static void indev_click_focus(lv_indev_proc_t * proc) /*Focus to the act. in its group*/ if(g_act) { - lv_group_focus_obj(indev_obj_act); + lv_group_focus_obj(obj_to_focus); if(indev_reset_check(proc)) return; } else { @@ -1158,9 +1158,9 @@ static void indev_click_focus(lv_indev_proc_t * proc) if(indev_reset_check(proc)) return; } - lv_signal_send(indev_obj_act, LV_SIGNAL_FOCUS, NULL); + lv_signal_send(obj_to_focus, LV_SIGNAL_FOCUS, NULL); if(indev_reset_check(proc)) return; - lv_event_send(indev_obj_act, LV_EVENT_FOCUSED, NULL); + lv_event_send(obj_to_focus, LV_EVENT_FOCUSED, NULL); if(indev_reset_check(proc)) return; #endif proc->types.pointer.last_pressed = obj_to_focus; diff --git a/src/lv_core/lv_obj_style.h b/src/lv_core/lv_obj_style.h index 598f240bf..c75a8cd36 100644 --- a/src/lv_core/lv_obj_style.h +++ b/src/lv_core/lv_obj_style.h @@ -473,6 +473,7 @@ _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_DECOR, text_decor, lv_text_decor_t, _int, sca _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_BLEND_MODE, text_blend_mode, lv_blend_mode_t, _int, scalar) _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_COLOR, text_color, lv_color_t, _color, nonscalar) _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_SEL_COLOR, text_sel_color, lv_color_t, _color, nonscalar) +_LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_SEL_BG_COLOR, text_sel_bg_color, lv_color_t, _color, nonscalar) _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_OPA, text_opa, lv_opa_t, _opa, scalar) _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_FONT, text_font, const lv_font_t *, _ptr, scalar) _LV_OBJ_STYLE_SET_GET_DECLARE(LINE_WIDTH, line_width, lv_style_int_t, _int, scalar) diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index 96c87bb0e..04cbfd42f 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -162,14 +162,15 @@ enum { LV_STYLE_PROP_INIT(LV_STYLE_VALUE_FONT, 0x7, LV_STYLE_ID_PTR + 0, LV_STYLE_ATTR_NONE), LV_STYLE_PROP_INIT(LV_STYLE_VALUE_STR, 0x7, LV_STYLE_ID_PTR + 1, LV_STYLE_ATTR_NONE), - LV_STYLE_PROP_INIT(LV_STYLE_TEXT_LETTER_SPACE, 0x8, LV_STYLE_ID_VALUE + 0, LV_STYLE_ATTR_INHERIT), - LV_STYLE_PROP_INIT(LV_STYLE_TEXT_LINE_SPACE, 0x8, LV_STYLE_ID_VALUE + 1, LV_STYLE_ATTR_INHERIT), - LV_STYLE_PROP_INIT(LV_STYLE_TEXT_DECOR, 0x8, LV_STYLE_ID_VALUE + 2, LV_STYLE_ATTR_INHERIT), - LV_STYLE_PROP_INIT(LV_STYLE_TEXT_BLEND_MODE, 0x8, LV_STYLE_ID_VALUE + 3, LV_STYLE_ATTR_INHERIT), - LV_STYLE_PROP_INIT(LV_STYLE_TEXT_COLOR, 0x8, LV_STYLE_ID_COLOR + 0, LV_STYLE_ATTR_INHERIT), - LV_STYLE_PROP_INIT(LV_STYLE_TEXT_SEL_COLOR, 0x8, LV_STYLE_ID_COLOR + 1, LV_STYLE_ATTR_INHERIT), - LV_STYLE_PROP_INIT(LV_STYLE_TEXT_OPA, 0x8, LV_STYLE_ID_OPA + 0, LV_STYLE_ATTR_INHERIT), - LV_STYLE_PROP_INIT(LV_STYLE_TEXT_FONT, 0x8, LV_STYLE_ID_PTR + 0, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_LETTER_SPACE, 0x8, LV_STYLE_ID_VALUE + 0, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_LINE_SPACE, 0x8, LV_STYLE_ID_VALUE + 1, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_DECOR, 0x8, LV_STYLE_ID_VALUE + 2, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_BLEND_MODE, 0x8, LV_STYLE_ID_VALUE + 3, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_COLOR, 0x8, LV_STYLE_ID_COLOR + 0, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_SEL_COLOR, 0x8, LV_STYLE_ID_COLOR + 1, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_SEL_BG_COLOR, 0x8, LV_STYLE_ID_COLOR + 2, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_OPA, 0x8, LV_STYLE_ID_OPA + 0, LV_STYLE_ATTR_INHERIT), + LV_STYLE_PROP_INIT(LV_STYLE_TEXT_FONT, 0x8, LV_STYLE_ID_PTR + 0, LV_STYLE_ATTR_INHERIT), LV_STYLE_PROP_INIT(LV_STYLE_LINE_WIDTH, 0x9, LV_STYLE_ID_VALUE + 0, LV_STYLE_ATTR_NONE), LV_STYLE_PROP_INIT(LV_STYLE_LINE_BLEND_MODE, 0x9, LV_STYLE_ID_VALUE + 1, LV_STYLE_ATTR_NONE), diff --git a/src/lv_draw/lv_draw_blend.c b/src/lv_draw/lv_draw_blend.c index 618431a3d..320a6a790 100644 --- a/src/lv_draw/lv_draw_blend.c +++ b/src/lv_draw/lv_draw_blend.c @@ -13,9 +13,11 @@ #include "../lv_core/lv_refr.h" #if LV_USE_GPU_NXP_PXP -#include "../lv_gpu/lv_gpu_nxp_pxp.h" + #include "../lv_gpu/lv_gpu_nxp_pxp.h" +#elif LV_USE_GPU_NXP_VG_LITE + #include "../lv_gpu/lv_gpu_nxp_vglite.h" #elif LV_USE_GPU_STM32_DMA2D -#include "../lv_gpu/lv_gpu_stm32_dma2d.h" + #include "../lv_gpu/lv_gpu_stm32_dma2d.h" #endif /********************* @@ -341,10 +343,17 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(const lv_area_t * disp_area, lv_co return; } #elif LV_USE_GPU_NXP_PXP - if(lv_area_get_size(draw_area) >= GPU_NXP_PXP_FILL_SIZE_LIMIT) { + if(lv_area_get_size(draw_area) >= LV_GPU_NXP_PXP_FILL_SIZE_LIMIT) { lv_gpu_nxp_pxp_fill(disp_buf, disp_w, draw_area, color, opa); return; } +#elif LV_USE_GPU_NXP_VG_LITE + if(lv_area_get_size(draw_area) >= LV_GPU_NXP_VG_LITE_FILL_SIZE_LIMIT) { + if(lv_gpu_nxp_vglite_fill(disp_buf, disp_w, lv_area_get_height(disp_area), draw_area, color, opa) == LV_RES_OK) { + return; + } + /* Fall down to SW render in case of error */ + } #elif LV_USE_GPU_STM32_DMA2D if(lv_area_get_size(draw_area) >= 240) { lv_gpu_stm32_dma2d_fill(disp_buf_first, disp_w, color, draw_area_w, draw_area_h); @@ -361,10 +370,17 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(const lv_area_t * disp_area, lv_co else { #if LV_USE_GPU_NXP_PXP - if(lv_area_get_size(draw_area) >= GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT) { + if(lv_area_get_size(draw_area) >= LV_GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT) { lv_gpu_nxp_pxp_fill(disp_buf, disp_w, draw_area, color, opa); return; } +#elif LV_USE_GPU_NXP_VG_LITE + if(lv_area_get_size(draw_area) >= LV_GPU_NXP_VG_LITE_FILL_OPA_SIZE_LIMIT) { + if(lv_gpu_nxp_vglite_fill(disp_buf, disp_w, lv_area_get_height(disp_area), draw_area, color, opa) == LV_RES_OK) { + return; + } + /* Fall down to SW render in case of error */ + } #elif LV_USE_GPU if(disp->driver.gpu_blend_cb && lv_area_get_size(draw_area) > GPU_SIZE_LIMIT) { for(x = 0; x < draw_area_w ; x++) blend_buf[x].full = color.full; @@ -385,6 +401,7 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(const lv_area_t * disp_area, lv_co lv_coord_t line_h = LV_HOR_RES_MAX / draw_area_w; for(y = 0; y <= draw_area_h - line_h; y += line_h) { lv_gpu_stm32_dma2d_blend(disp_buf_first, disp_w, blend_buf, opa, draw_area_w, draw_area_w, line_h); + lv_gpu_stm32_dma2d_wait_cb(NULL); disp_buf_first += disp_w * line_h; } @@ -741,15 +758,46 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col if(opa > LV_OPA_MAX) { #if LV_USE_GPU_NXP_PXP - if (lv_area_get_size(draw_area) >= GPU_NXP_PXP_BLIT_SIZE_LIMIT) { - lv_gpu_nxp_pxp_blit(disp_buf_first, disp_w, map_buf_first, map_w, draw_area_w, draw_area_h, opa); - return; - } + if(lv_area_get_size(draw_area) >= GPU_NXP_PXP_BLIT_SIZE_LIMIT) { + lv_gpu_nxp_pxp_blit(disp_buf_first, disp_w, map_buf_first, map_w, draw_area_w, draw_area_h, opa); + return; + } +#elif (LV_USE_GPU_NXP_VG_LITE) + if(lv_area_get_size(draw_area) >= LV_GPU_NXP_VG_LITE_BLIT_SIZE_LIMIT) { + + lv_gpu_nxp_vglite_blit_info_t blit; + + blit.src = map_buf; + blit.src_width = draw_area_w; + blit.src_height = draw_area_h; + blit.src_stride = lv_area_get_width(map_area) * sizeof(lv_color_t); + blit.src_area.x1 = (draw_area->x1 - (map_area->x1 - disp_area->x1)); + blit.src_area.y1 = (draw_area->y1 - (map_area->y1 - disp_area->y1)); + blit.src_area.x2 = blit.src_area.x1 + draw_area_w; + blit.src_area.y2 = blit.src_area.y1 + draw_area_h; + + + blit.dst = disp_buf; + blit.dst_width = lv_area_get_width(disp_area); + blit.dst_height = lv_area_get_height(disp_area); + blit.dst_stride = lv_area_get_width(disp_area) * sizeof(lv_color_t); + blit.dst_area.x1 = draw_area->x1; + blit.dst_area.y1 = draw_area->y1; + blit.dst_area.x2 = blit.dst_area.x1 + draw_area_w; + blit.dst_area.y2 = blit.dst_area.y1 + draw_area_h; + + blit.opa = opa; + + if(lv_gpu_nxp_vglite_blit(&blit) == LV_RES_OK) { + return; + } + /* Fall down to SW render in case of error */ + } #elif LV_USE_GPU_STM32_DMA2D - if(lv_area_get_size(draw_area) >= 240) { - lv_gpu_stm32_dma2d_copy(disp_buf_first, disp_w, map_buf_first, map_w, draw_area_w, draw_area_h); - return; - } + if(lv_area_get_size(draw_area) >= 240) { + lv_gpu_stm32_dma2d_copy(disp_buf_first, disp_w, map_buf_first, map_w, draw_area_w, draw_area_h); + return; + } #endif /*Software rendering*/ @@ -761,10 +809,41 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col } else { #if LV_USE_GPU_NXP_PXP - if (lv_area_get_size(draw_area) >= GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT) { + if(lv_area_get_size(draw_area) >= LV_GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT) { lv_gpu_nxp_pxp_blit(disp_buf_first, disp_w, map_buf_first, map_w, draw_area_w, draw_area_h, opa); return; } +#elif (LV_USE_GPU_NXP_VG_LITE) + if(lv_area_get_size(draw_area) >= LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT) { + + lv_gpu_nxp_vglite_blit_info_t blit; + + blit.src = map_buf; + blit.src_width = lv_area_get_width(map_area); + blit.src_height = lv_area_get_height(map_area); + blit.src_stride = lv_area_get_width(map_area) * sizeof(lv_color_t); + blit.src_area.x1 = (draw_area->x1 - (map_area->x1 - disp_area->x1)); + blit.src_area.y1 = (draw_area->y1 - (map_area->y1 - disp_area->y1)); + blit.src_area.x2 = blit.src_area.x1 + draw_area_w; + blit.src_area.y2 = blit.src_area.y1 + draw_area_h; + + + blit.dst = disp_buf; + blit.dst_width = lv_area_get_width(disp_area); + blit.dst_height = lv_area_get_height(disp_area); + blit.dst_stride = lv_area_get_width(disp_area) * sizeof(lv_color_t); + blit.dst_area.x1 = draw_area->x1; + blit.dst_area.y1 = draw_area->y1; + blit.dst_area.x2 = blit.dst_area.x1 + draw_area_w; + blit.dst_area.y2 = blit.dst_area.y1 + draw_area_h; + + blit.opa = opa; + + if(lv_gpu_nxp_vglite_blit(&blit) == LV_RES_OK) { + return; + } + /* Fall down to SW render in case of error */ + } #elif LV_USE_GPU_STM32_DMA2D if(lv_area_get_size(draw_area) >= 240) { lv_gpu_stm32_dma2d_blend(disp_buf_first, disp_w, map_buf_first, opa, map_w, draw_area_w, draw_area_h); diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 421cab9b8..1e6de095f 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -14,9 +14,9 @@ #include "../lv_misc/lv_mem.h" #include "../lv_misc/lv_math.h" #if LV_USE_GPU_STM32_DMA2D -#include "../lv_gpu/lv_gpu_stm32_dma2d.h" + #include "../lv_gpu/lv_gpu_stm32_dma2d.h" #elif LV_USE_GPU_NXP_PXP -#include "../lv_gpu/lv_gpu_nxp_pxp.h" + #include "../lv_gpu/lv_gpu_nxp_pxp.h" #endif /********************* @@ -360,18 +360,19 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const } #if LV_USE_GPU_NXP_PXP /* Simple case without masking and transformations */ - else if (other_mask_cnt == 0 && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE && alpha_byte == false && + else if(other_mask_cnt == 0 && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE && alpha_byte == false && chroma_key == true && draw_dsc->recolor_opa == LV_OPA_TRANSP) { /* copy with color keying (+ alpha) */ - lv_gpu_nxp_pxp_enable_color_key(); - _lv_blend_map(clip_area, map_area, (lv_color_t *)map_p, NULL, LV_DRAW_MASK_RES_FULL_COVER, draw_dsc->opa, - draw_dsc->blend_mode); - lv_gpu_nxp_pxp_disable_color_key(); - } else if (other_mask_cnt == 0 && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE && alpha_byte == false && + lv_gpu_nxp_pxp_enable_color_key(); + _lv_blend_map(clip_area, map_area, (lv_color_t *)map_p, NULL, LV_DRAW_MASK_RES_FULL_COVER, draw_dsc->opa, + draw_dsc->blend_mode); + lv_gpu_nxp_pxp_disable_color_key(); + } + else if(other_mask_cnt == 0 && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE && alpha_byte == false && chroma_key == false && draw_dsc->recolor_opa != LV_OPA_TRANSP) { /* copy with recolor (+ alpha) */ - lv_gpu_nxp_pxp_enable_recolor(draw_dsc->recolor, draw_dsc->recolor_opa); - _lv_blend_map(clip_area, map_area, (lv_color_t *)map_p, NULL, LV_DRAW_MASK_RES_FULL_COVER, draw_dsc->opa, - draw_dsc->blend_mode); - lv_gpu_nxp_pxp_disable_recolor(); + lv_gpu_nxp_pxp_enable_recolor(draw_dsc->recolor, draw_dsc->recolor_opa); + _lv_blend_map(clip_area, map_area, (lv_color_t *)map_p, NULL, LV_DRAW_MASK_RES_FULL_COVER, draw_dsc->opa, + draw_dsc->blend_mode); + lv_gpu_nxp_pxp_disable_recolor(); } #endif /*In the other cases every pixel need to be checked one-by-one*/ @@ -418,7 +419,8 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const return; } #endif - uint32_t mask_buf_size = lv_area_get_size(&draw_area) > LV_HOR_RES_MAX ? LV_HOR_RES_MAX : lv_area_get_size(&draw_area); + uint32_t hor_res = (uint32_t) lv_disp_get_hor_res(disp); + uint32_t mask_buf_size = lv_area_get_size(&draw_area) > (uint32_t) hor_res ? hor_res : lv_area_get_size(&draw_area); lv_color_t * map2 = _lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t)); lv_opa_t * mask_buf = _lv_mem_buf_get(mask_buf_size); @@ -468,7 +470,8 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const /*Most complicated case: transform or other mask or chroma keyed*/ else { /*Build the image and a mask line-by-line*/ - uint32_t mask_buf_size = lv_area_get_size(&draw_area) > LV_HOR_RES_MAX ? LV_HOR_RES_MAX : lv_area_get_size(&draw_area); + uint32_t hor_res = (uint32_t) lv_disp_get_hor_res(disp); + uint32_t mask_buf_size = lv_area_get_size(&draw_area) > hor_res ? hor_res : lv_area_get_size(&draw_area); lv_color_t * map2 = _lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t)); lv_opa_t * mask_buf = _lv_mem_buf_get(mask_buf_size); diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index a21059edc..c57848ebd 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -98,7 +98,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc) dsc->font = LV_THEME_DEFAULT_FONT_NORMAL; dsc->sel_start = LV_DRAW_LABEL_NO_TXT_SEL; dsc->sel_end = LV_DRAW_LABEL_NO_TXT_SEL; - dsc->sel_color = LV_COLOR_BLUE; + dsc->sel_color = LV_COLOR_BLACK; + dsc->sel_bg_color = LV_COLOR_BLUE; dsc->bidi_dir = LV_BIDI_DIR_LTR; } @@ -234,7 +235,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(const lv_area_t * coords, const lv_area lv_draw_rect_dsc_t draw_dsc_sel; lv_draw_rect_dsc_init(&draw_dsc_sel); - draw_dsc_sel.bg_color = dsc->sel_color; + draw_dsc_sel.bg_color = dsc->sel_bg_color; int32_t pos_x_start = pos.x; /*Write out all lines*/ @@ -320,6 +321,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(const lv_area_t * coords, const lv_area sel_coords.x2 = pos.x + letter_w + dsc->letter_space - 1; sel_coords.y2 = pos.y + line_height - 1; lv_draw_rect(&sel_coords, mask, &draw_dsc_sel); + color = dsc->sel_color; } } @@ -522,7 +524,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_coord_t pos_x, lv_coord_ uint32_t col_bit; col_bit = bit_ofs & 0x7; /* "& 0x7" equals to "% 8" just faster */ - uint32_t mask_buf_size = box_w * box_h > LV_HOR_RES_MAX ? LV_HOR_RES_MAX : box_w * box_h; + lv_coord_t hor_res = lv_disp_get_hor_res(_lv_refr_get_disp_refreshing()); + uint32_t mask_buf_size = box_w * box_h > hor_res ? hor_res : box_w * box_h; lv_opa_t * mask_buf = _lv_mem_buf_get(mask_buf_size); int32_t mask_p = 0; diff --git a/src/lv_draw/lv_draw_label.h b/src/lv_draw/lv_draw_label.h index b28381002..b6c81292f 100644 --- a/src/lv_draw/lv_draw_label.h +++ b/src/lv_draw/lv_draw_label.h @@ -29,6 +29,7 @@ extern "C" { typedef struct { lv_color_t color; lv_color_t sel_color; + lv_color_t sel_bg_color; const lv_font_t * font; lv_opa_t opa; lv_style_int_t line_space; diff --git a/src/lv_draw/lv_draw_line.c b/src/lv_draw/lv_draw_line.c index 38e29cdfb..1ae458f3f 100644 --- a/src/lv_draw/lv_draw_line.c +++ b/src/lv_draw/lv_draw_line.c @@ -424,7 +424,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(const lv_point_t * point1, cons /*Draw the background line by line*/ int32_t h; - size_t mask_buf_size = LV_MATH_MIN(lv_area_get_size(&draw_area), LV_HOR_RES_MAX); + uint32_t hor_res = (uint32_t)lv_disp_get_hor_res(disp); + size_t mask_buf_size = LV_MATH_MIN(lv_area_get_size(&draw_area), hor_res); lv_opa_t * mask_buf = _lv_mem_buf_get(mask_buf_size); lv_area_t fill_area; diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index b2d517757..4d41d4405 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -51,7 +51,7 @@ LV_ATTRIBUTE_FAST_MEM static void shadow_blur_corner(lv_coord_t size, lv_coord_t static void draw_value_str(const lv_area_t * coords, const lv_area_t * clip, const lv_draw_rect_dsc_t * dsc); #endif static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * area_outer, const lv_area_t * clip, - lv_coord_t radius, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode); + lv_coord_t radius, bool radius_is_in, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode); LV_ATTRIBUTE_FAST_MEM static inline lv_color_t grad_get(const lv_draw_rect_dsc_t * dsc, lv_coord_t s, lv_coord_t i); /********************** @@ -410,7 +410,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_border(const lv_area_t * coords, const lv area_inner.y2 -= ((dsc->border_side & LV_BORDER_SIDE_BOTTOM) ? dsc->border_width : - (dsc->border_width + rout)); if(dsc->border_side == LV_BORDER_SIDE_FULL) { - draw_full_border(&area_inner, coords, clip, dsc->radius, dsc->border_color, dsc->border_opa, dsc->border_blend_mode); + draw_full_border(&area_inner, coords, clip, dsc->radius, false, dsc->border_color, dsc->border_opa, + dsc->border_blend_mode); } else { lv_opa_t opa = dsc->border_opa; @@ -1176,7 +1177,7 @@ static void draw_outline(const lv_area_t * coords, const lv_area_t * clip, const area_outer.y1 -= dsc->outline_width; area_outer.y2 += dsc->outline_width; - draw_full_border(&area_inner, &area_outer, clip, dsc->radius, dsc->outline_color, dsc->outline_opa, + draw_full_border(&area_inner, &area_outer, clip, dsc->radius, true, dsc->outline_color, dsc->outline_opa, dsc->outline_blend_mode); } #endif @@ -1325,7 +1326,7 @@ static void draw_value_str(const lv_area_t * coords, const lv_area_t * clip, con #endif static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * area_outer, const lv_area_t * clip, - lv_coord_t radius, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode) + lv_coord_t radius, bool radius_is_in, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode) { uint8_t other_mask_cnt = lv_draw_mask_get_cnt(); bool simple_mode = true; @@ -1334,18 +1335,30 @@ static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * are int32_t inner_w = lv_area_get_width(area_inner); int32_t inner_h = lv_area_get_height(area_inner); lv_coord_t border_width = area_outer->x2 - area_inner->x2; - int32_t rin = radius; - - int32_t short_side = LV_MATH_MIN(inner_w, inner_h); - if(rin > short_side >> 1) rin = short_side >> 1; - - /*Get the outer area*/ - int32_t rout = rin + border_width; int32_t coords_out_w = lv_area_get_width(area_outer); int32_t coords_out_h = lv_area_get_height(area_outer); - short_side = LV_MATH_MIN(coords_out_w, coords_out_h); - if(rout > short_side >> 1) rout = short_side >> 1; + + int32_t rin; + int32_t rout; + if(radius_is_in) { + rin = radius; + int32_t short_side = LV_MATH_MIN(inner_w, inner_h); + if(rin > short_side >> 1) rin = short_side >> 1; + + /*Get the outer area*/ + rout = rin + border_width; + } + else { + rout = radius; + int32_t short_side = LV_MATH_MIN(coords_out_w, coords_out_h); + if(rout > short_side >> 1) rout = short_side >> 1; + + /*Get the outer area*/ + rin = rout - border_width; + if(rin < 0) rin = 0; + + } lv_disp_t * disp = _lv_refr_get_disp_refreshing(); lv_disp_buf_t * vdb = lv_disp_get_buf(disp); diff --git a/src/lv_font/lv_font_montserrat_10.c b/src/lv_font/lv_font_montserrat_10.c new file mode 100644 index 000000000..3f42da8b1 --- /dev/null +++ b/src/lv_font/lv_font_montserrat_10.c @@ -0,0 +1,1622 @@ +#include "../../lvgl.h" + +/******************************************************************************* + * Size: 10 px + * Bpp: 4 + * Opts: --no-compress --no-prefilter --bpp 4 --size 10 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o lv_font_montserrat_10.c --force-fast-kern-format + ******************************************************************************/ + +#ifndef LV_FONT_MONTSERRAT_10 + #define LV_FONT_MONTSERRAT_10 1 +#endif + +#if LV_FONT_MONTSERRAT_10 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { + /* U+20 " " */ + + /* U+21 "!" */ + 0x3e, 0x2d, 0x2c, 0x1c, 0x5, 0x1, 0x2d, + + /* U+22 "\"" */ + 0x57, 0x84, 0x56, 0x83, 0x23, 0x41, + + /* U+23 "#" */ + 0x0, 0xb0, 0x28, 0x0, 0xb, 0x4, 0x60, 0x4a, + 0xea, 0xdc, 0x80, 0x28, 0x8, 0x20, 0x8c, 0xdb, + 0xeb, 0x40, 0x64, 0xb, 0x0, 0x8, 0x30, 0xb0, + 0x0, + + /* U+24 "$" */ + 0x0, 0x13, 0x0, 0x8, 0xde, 0xc3, 0x5b, 0x27, + 0x11, 0x4d, 0x57, 0x0, 0x6, 0xce, 0x80, 0x0, + 0x29, 0x9a, 0x32, 0x27, 0x5b, 0x3c, 0xde, 0xb2, + 0x0, 0x27, 0x0, + + /* U+25 "%" */ + 0x29, 0x92, 0x2, 0x90, 0x9, 0x11, 0x90, 0xa1, + 0x0, 0x82, 0x28, 0x74, 0x0, 0x1, 0x88, 0x49, + 0x68, 0x40, 0x0, 0xb, 0x29, 0xa, 0x0, 0x8, + 0x32, 0x80, 0xa0, 0x3, 0x80, 0x8, 0x87, 0x0, + + /* U+26 "&" */ + 0x3, 0xcb, 0x70, 0x0, 0xa4, 0xd, 0x0, 0x5, + 0xba, 0x60, 0x0, 0x7c, 0xc0, 0x10, 0x5a, 0x7, + 0xbb, 0x37, 0x80, 0xa, 0xe0, 0xa, 0xcc, 0x97, + 0x70, 0x0, 0x0, 0x0, + + /* U+27 "'" */ + 0x57, 0x56, 0x23, + + /* U+28 "(" */ + 0x2, 0xc0, 0x9, 0x60, 0xd, 0x10, 0xe, 0x0, + 0xe, 0x0, 0xe, 0x0, 0xd, 0x10, 0x9, 0x60, + 0x2, 0xc0, + + /* U+29 ")" */ + 0x68, 0x0, 0xe0, 0xb, 0x30, 0x95, 0x8, 0x60, + 0x95, 0xb, 0x30, 0xe0, 0x68, 0x0, + + /* U+2A "*" */ + 0x24, 0x42, 0x4d, 0xd4, 0x79, 0x97, 0x2, 0x20, + + /* U+2B "+" */ + 0x0, 0x0, 0x0, 0x0, 0x85, 0x0, 0x3b, 0xdc, + 0xb1, 0x0, 0x85, 0x0, 0x0, 0x85, 0x0, + + /* U+2C "," */ + 0x35, 0x4a, 0x55, + + /* U+2D "-" */ + 0x5c, 0xc3, + + /* U+2E "." */ + 0x2, 0x6a, + + /* U+2F "/" */ + 0x0, 0x2, 0xb0, 0x0, 0x85, 0x0, 0xd, 0x0, + 0x4, 0x90, 0x0, 0xa3, 0x0, 0xd, 0x0, 0x5, + 0x80, 0x0, 0xb2, 0x0, 0x1c, 0x0, 0x0, + + /* U+30 "0" */ + 0x4, 0xdd, 0xb1, 0x1, 0xe2, 0x6, 0xb0, 0x69, + 0x0, 0xe, 0x17, 0x80, 0x0, 0xd2, 0x69, 0x0, + 0xe, 0x11, 0xe2, 0x6, 0xb0, 0x4, 0xdd, 0xb1, + 0x0, + + /* U+31 "1" */ + 0xbe, 0xa0, 0x5a, 0x5, 0xa0, 0x5a, 0x5, 0xa0, + 0x5a, 0x5, 0xa0, + + /* U+32 "2" */ + 0x4c, 0xdd, 0x50, 0x42, 0x1, 0xf0, 0x0, 0x0, + 0xf0, 0x0, 0xa, 0x80, 0x0, 0xa9, 0x0, 0xb, + 0x80, 0x0, 0x8f, 0xdd, 0xd5, + + /* U+33 "3" */ + 0x8d, 0xde, 0xe0, 0x0, 0xc, 0x40, 0x0, 0x98, + 0x0, 0x0, 0xbd, 0x90, 0x0, 0x0, 0xd3, 0x51, + 0x1, 0xe2, 0x6d, 0xdd, 0x60, + + /* U+34 "4" */ + 0x0, 0x7, 0xa0, 0x0, 0x5, 0xc0, 0x0, 0x3, + 0xd1, 0x31, 0x1, 0xd2, 0xb, 0x30, 0x8d, 0xcc, + 0xfd, 0x70, 0x0, 0xb, 0x30, 0x0, 0x0, 0xb3, + 0x0, + + /* U+35 "5" */ + 0xf, 0xdd, 0xd0, 0x1d, 0x0, 0x0, 0x2c, 0x0, + 0x0, 0x3e, 0xdc, 0x60, 0x0, 0x1, 0xd4, 0x31, + 0x0, 0xc4, 0x5c, 0xdd, 0x80, + + /* U+36 "6" */ + 0x2, 0xbd, 0xd4, 0x1e, 0x40, 0x0, 0x6a, 0x0, + 0x0, 0x7a, 0xab, 0xa1, 0x6e, 0x10, 0x5c, 0x1d, + 0x0, 0x3c, 0x4, 0xcc, 0xb2, + + /* U+37 "7" */ + 0xbd, 0xdd, 0xe8, 0xb4, 0x0, 0xd3, 0x0, 0x4, + 0xc0, 0x0, 0xc, 0x40, 0x0, 0x3d, 0x0, 0x0, + 0xa6, 0x0, 0x1, 0xe0, 0x0, + + /* U+38 "8" */ + 0x7, 0xcc, 0xb2, 0x3d, 0x0, 0x6a, 0x2d, 0x0, + 0x79, 0xb, 0xec, 0xf2, 0x6a, 0x0, 0x4d, 0x79, + 0x0, 0x3e, 0x9, 0xcb, 0xc4, + + /* U+39 "9" */ + 0x1a, 0xcc, 0x60, 0x96, 0x0, 0xb3, 0x97, 0x0, + 0xc9, 0x9, 0xbb, 0x8a, 0x0, 0x0, 0x88, 0x0, + 0x2, 0xe2, 0x2d, 0xdc, 0x40, + + /* U+3A ":" */ + 0x6a, 0x1, 0x0, 0x2, 0x6a, + + /* U+3B ";" */ + 0x6a, 0x1, 0x0, 0x0, 0x6a, 0x38, 0x32, + + /* U+3C "<" */ + 0x0, 0x0, 0x10, 0x0, 0x5a, 0xa1, 0x3e, 0x61, + 0x0, 0x6, 0xb9, 0x30, 0x0, 0x2, 0x81, + + /* U+3D "=" */ + 0x3b, 0xbb, 0xb1, 0x0, 0x0, 0x0, 0x3b, 0xbb, + 0xb1, + + /* U+3E ">" */ + 0x10, 0x0, 0x0, 0x2b, 0xa4, 0x0, 0x0, 0x18, + 0xe1, 0x4, 0xab, 0x50, 0x37, 0x10, 0x0, + + /* U+3F "?" */ + 0x3c, 0xdd, 0x50, 0x52, 0x1, 0xf0, 0x0, 0x3, + 0xd0, 0x0, 0x3d, 0x20, 0x0, 0x85, 0x0, 0x0, + 0x10, 0x0, 0x0, 0xb4, 0x0, + + /* U+40 "@" */ + 0x0, 0x4a, 0x99, 0xa7, 0x0, 0x6, 0x90, 0x0, + 0x3, 0xa0, 0x1b, 0x7, 0xcb, 0x9b, 0x47, 0x65, + 0x4b, 0x0, 0x8b, 0xa, 0x73, 0x77, 0x0, 0x3b, + 0xa, 0x65, 0x3b, 0x0, 0x8b, 0xa, 0x1b, 0x6, + 0xcb, 0x6c, 0xb3, 0x6, 0x90, 0x0, 0x0, 0x0, + 0x0, 0x4a, 0x9a, 0xa2, 0x0, + + /* U+41 "A" */ + 0x0, 0x1, 0xf6, 0x0, 0x0, 0x0, 0x88, 0xc0, + 0x0, 0x0, 0xd, 0x9, 0x40, 0x0, 0x6, 0x70, + 0x2b, 0x0, 0x0, 0xdc, 0xcc, 0xe3, 0x0, 0x59, + 0x0, 0x4, 0xa0, 0xc, 0x30, 0x0, 0xd, 0x10, + + /* U+42 "B" */ + 0xfc, 0xcc, 0xb2, 0xf, 0x0, 0x7, 0xa0, 0xf0, + 0x0, 0x88, 0xf, 0xcc, 0xdf, 0x30, 0xf0, 0x0, + 0x2e, 0xf, 0x0, 0x1, 0xf0, 0xfc, 0xcc, 0xc5, + 0x0, + + /* U+43 "C" */ + 0x1, 0x9d, 0xdc, 0x30, 0xd6, 0x0, 0x35, 0x5b, + 0x0, 0x0, 0x7, 0x80, 0x0, 0x0, 0x5b, 0x0, + 0x0, 0x0, 0xd6, 0x0, 0x35, 0x1, 0x9d, 0xdc, + 0x30, + + /* U+44 "D" */ + 0xfd, 0xdd, 0xb3, 0xf, 0x0, 0x3, 0xe2, 0xf0, + 0x0, 0x6, 0x9f, 0x0, 0x0, 0x4b, 0xf0, 0x0, + 0x6, 0x9f, 0x0, 0x3, 0xe2, 0xfd, 0xdd, 0xb3, + 0x0, + + /* U+45 "E" */ + 0xfd, 0xdd, 0xc0, 0xf0, 0x0, 0x0, 0xf0, 0x0, + 0x0, 0xfc, 0xcc, 0x70, 0xf0, 0x0, 0x0, 0xf0, + 0x0, 0x0, 0xfd, 0xdd, 0xd1, + + /* U+46 "F" */ + 0xfd, 0xdd, 0xcf, 0x0, 0x0, 0xf0, 0x0, 0xf, + 0xdd, 0xd7, 0xf0, 0x0, 0xf, 0x0, 0x0, 0xf0, + 0x0, 0x0, + + /* U+47 "G" */ + 0x1, 0x9d, 0xdc, 0x40, 0xd7, 0x0, 0x25, 0x5b, + 0x0, 0x0, 0x7, 0x80, 0x0, 0x7, 0x5b, 0x0, + 0x1, 0xd0, 0xd6, 0x0, 0x3d, 0x1, 0x9d, 0xdc, + 0x50, + + /* U+48 "H" */ + 0xf0, 0x0, 0xf, 0x1f, 0x0, 0x0, 0xf1, 0xf0, + 0x0, 0xf, 0x1f, 0xdd, 0xdd, 0xf1, 0xf0, 0x0, + 0xf, 0x1f, 0x0, 0x0, 0xf1, 0xf0, 0x0, 0xf, + 0x10, + + /* U+49 "I" */ + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + + /* U+4A "J" */ + 0x4, 0xdd, 0xf2, 0x0, 0x0, 0xd2, 0x0, 0x0, + 0xd2, 0x0, 0x0, 0xd2, 0x0, 0x0, 0xd2, 0x6, + 0x1, 0xe0, 0x8, 0xdd, 0x60, + + /* U+4B "K" */ + 0xf0, 0x0, 0xa8, 0xf, 0x0, 0x99, 0x0, 0xf0, + 0x99, 0x0, 0xf, 0x9f, 0x40, 0x0, 0xfb, 0x4e, + 0x20, 0xf, 0x10, 0x5d, 0x10, 0xf0, 0x0, 0x6b, + 0x0, + + /* U+4C "L" */ + 0xf0, 0x0, 0xf, 0x0, 0x0, 0xf0, 0x0, 0xf, + 0x0, 0x0, 0xf0, 0x0, 0xf, 0x0, 0x0, 0xfd, + 0xdd, 0xa0, + + /* U+4D "M" */ + 0xf2, 0x0, 0x0, 0x97, 0xfc, 0x0, 0x3, 0xf7, + 0xfa, 0x50, 0xc, 0xa7, 0xf1, 0xd0, 0x69, 0x77, + 0xf0, 0x79, 0xd1, 0x77, 0xf0, 0xd, 0x60, 0x77, + 0xf0, 0x1, 0x0, 0x77, + + /* U+4E "N" */ + 0xf4, 0x0, 0xf, 0x1f, 0xe2, 0x0, 0xf1, 0xf6, + 0xd0, 0xf, 0x1f, 0x9, 0xa0, 0xf1, 0xf0, 0xb, + 0x7f, 0x1f, 0x0, 0x1d, 0xf1, 0xf0, 0x0, 0x3f, + 0x10, + + /* U+4F "O" */ + 0x1, 0x9d, 0xdc, 0x40, 0xd, 0x60, 0x2, 0xd4, + 0x5b, 0x0, 0x0, 0x4b, 0x78, 0x0, 0x0, 0x1e, + 0x5b, 0x0, 0x0, 0x4b, 0xd, 0x60, 0x2, 0xd4, + 0x1, 0x9d, 0xdc, 0x40, + + /* U+50 "P" */ + 0xfd, 0xdd, 0x90, 0xf0, 0x0, 0xa7, 0xf0, 0x0, + 0x5a, 0xf0, 0x0, 0xb6, 0xfd, 0xdc, 0x70, 0xf0, + 0x0, 0x0, 0xf0, 0x0, 0x0, + + /* U+51 "Q" */ + 0x1, 0x9d, 0xdc, 0x40, 0x0, 0xc7, 0x0, 0x3d, + 0x40, 0x5b, 0x0, 0x0, 0x4b, 0x7, 0x80, 0x0, + 0x1, 0xe0, 0x5a, 0x0, 0x0, 0x4c, 0x0, 0xd6, + 0x0, 0x2d, 0x40, 0x1, 0xad, 0xdd, 0x40, 0x0, + 0x0, 0x4, 0xab, 0xa0, + + /* U+52 "R" */ + 0xfd, 0xdd, 0x90, 0xf0, 0x0, 0xa7, 0xf0, 0x0, + 0x5a, 0xf0, 0x0, 0xb7, 0xfc, 0xcf, 0x90, 0xf0, + 0x5, 0xb0, 0xf0, 0x0, 0x97, + + /* U+53 "S" */ + 0x8, 0xdc, 0xc3, 0x5b, 0x0, 0x11, 0x4d, 0x20, + 0x0, 0x6, 0xde, 0x90, 0x0, 0x1, 0x9a, 0x33, + 0x0, 0x5b, 0x3b, 0xcc, 0xb2, + + /* U+54 "T" */ + 0xcd, 0xee, 0xda, 0x0, 0x97, 0x0, 0x0, 0x97, + 0x0, 0x0, 0x97, 0x0, 0x0, 0x97, 0x0, 0x0, + 0x97, 0x0, 0x0, 0x97, 0x0, + + /* U+55 "U" */ + 0xf, 0x0, 0x1, 0xe0, 0xf0, 0x0, 0x1e, 0xf, + 0x0, 0x1, 0xe0, 0xf0, 0x0, 0x1e, 0xe, 0x0, + 0x2, 0xd0, 0xa7, 0x0, 0x98, 0x1, 0xad, 0xd9, + 0x0, + + /* U+56 "V" */ + 0xc, 0x40, 0x0, 0x1d, 0x0, 0x5b, 0x0, 0x8, + 0x70, 0x0, 0xe2, 0x0, 0xe1, 0x0, 0x7, 0x90, + 0x69, 0x0, 0x0, 0x1e, 0x1d, 0x20, 0x0, 0x0, + 0x9c, 0xb0, 0x0, 0x0, 0x2, 0xf4, 0x0, 0x0, + + /* U+57 "W" */ + 0x88, 0x0, 0xf, 0x40, 0x2, 0xc3, 0xd0, 0x5, + 0xea, 0x0, 0x86, 0xd, 0x20, 0xa4, 0xe0, 0xd, + 0x10, 0x88, 0xd, 0xa, 0x43, 0xc0, 0x2, 0xd5, + 0x90, 0x4a, 0x86, 0x0, 0xd, 0xd3, 0x0, 0xed, + 0x10, 0x0, 0x8e, 0x0, 0xa, 0xc0, 0x0, + + /* U+58 "X" */ + 0x5c, 0x0, 0x1d, 0x10, 0x98, 0xb, 0x50, 0x0, + 0xda, 0x90, 0x0, 0x6, 0xf2, 0x0, 0x1, 0xd7, + 0xc0, 0x0, 0xc5, 0xa, 0x80, 0x8a, 0x0, 0xd, + 0x30, + + /* U+59 "Y" */ + 0xb, 0x50, 0x0, 0xc3, 0x2, 0xd0, 0x6, 0x90, + 0x0, 0x88, 0x1d, 0x10, 0x0, 0xd, 0xb6, 0x0, + 0x0, 0x5, 0xd0, 0x0, 0x0, 0x4, 0xb0, 0x0, + 0x0, 0x4, 0xb0, 0x0, + + /* U+5A "Z" */ + 0x6d, 0xdd, 0xdf, 0x10, 0x0, 0xb, 0x70, 0x0, + 0x8, 0xa0, 0x0, 0x4, 0xd0, 0x0, 0x2, 0xe2, + 0x0, 0x0, 0xd4, 0x0, 0x0, 0x8f, 0xdd, 0xdd, + 0x30, + + /* U+5B "[" */ + 0xfb, 0x1f, 0x0, 0xf0, 0xf, 0x0, 0xf0, 0xf, + 0x0, 0xf0, 0xf, 0x0, 0xfb, 0x10, + + /* U+5C "\\" */ + 0x3a, 0x0, 0x0, 0xc1, 0x0, 0x7, 0x60, 0x0, + 0x1c, 0x0, 0x0, 0xb2, 0x0, 0x5, 0x80, 0x0, + 0xd, 0x0, 0x0, 0xa3, 0x0, 0x4, 0x90, + + /* U+5D "]" */ + 0x9e, 0x40, 0xb4, 0xb, 0x40, 0xb4, 0xb, 0x40, + 0xb4, 0xb, 0x40, 0xb4, 0x9e, 0x40, + + /* U+5E "^" */ + 0x0, 0xa8, 0x0, 0x2, 0x9b, 0x0, 0x9, 0x25, + 0x60, 0x1b, 0x0, 0xb0, + + /* U+5F "_" */ + 0x99, 0x99, 0x90, + + /* U+60 "`" */ + 0x3a, 0x30, + + /* U+61 "a" */ + 0x1b, 0xcd, 0x60, 0x1, 0x0, 0xe0, 0x1a, 0xaa, + 0xf1, 0x78, 0x0, 0xe1, 0x2c, 0xaa, 0xe1, + + /* U+62 "b" */ + 0x1e, 0x0, 0x0, 0x1, 0xe0, 0x0, 0x0, 0x1e, + 0xac, 0xd6, 0x1, 0xf3, 0x1, 0xe2, 0x1e, 0x0, + 0xa, 0x51, 0xf4, 0x1, 0xe2, 0x1d, 0x9c, 0xd5, + 0x0, + + /* U+63 "c" */ + 0x7, 0xdd, 0xa0, 0x5c, 0x0, 0x40, 0x87, 0x0, + 0x0, 0x5c, 0x0, 0x41, 0x7, 0xdd, 0xa0, + + /* U+64 "d" */ + 0x0, 0x0, 0xe, 0x0, 0x0, 0xe, 0x8, 0xdc, + 0x9e, 0x5c, 0x0, 0x7e, 0x87, 0x0, 0x1e, 0x5b, + 0x0, 0x6e, 0x8, 0xdb, 0x8e, + + /* U+65 "e" */ + 0x8, 0xcc, 0x90, 0x5a, 0x0, 0x87, 0x8c, 0xaa, + 0xa8, 0x5b, 0x0, 0x20, 0x7, 0xdc, 0xb1, + + /* U+66 "f" */ + 0x7, 0xc9, 0xe, 0x0, 0x9f, 0xb6, 0xf, 0x0, + 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, + + /* U+67 "g" */ + 0x8, 0xdc, 0x9e, 0x5b, 0x0, 0x5f, 0x87, 0x0, + 0xf, 0x5c, 0x0, 0x6f, 0x7, 0xdc, 0x9f, 0x3, + 0x0, 0x4c, 0x1a, 0xcc, 0xb2, + + /* U+68 "h" */ + 0x1e, 0x0, 0x0, 0x1e, 0x0, 0x0, 0x1e, 0xac, + 0xd4, 0x1f, 0x30, 0x3d, 0x1e, 0x0, 0xe, 0x1e, + 0x0, 0xf, 0x1e, 0x0, 0xf, + + /* U+69 "i" */ + 0x2d, 0x0, 0x10, 0x1e, 0x1, 0xe0, 0x1e, 0x1, + 0xe0, 0x1e, 0x0, + + /* U+6A "j" */ + 0x1, 0xe0, 0x0, 0x10, 0x0, 0xe0, 0x0, 0xe0, + 0x0, 0xe0, 0x0, 0xe0, 0x0, 0xe0, 0x1, 0xe0, + 0xad, 0x60, + + /* U+6B "k" */ + 0x1e, 0x0, 0x0, 0x1, 0xe0, 0x0, 0x0, 0x1e, + 0x1, 0xb6, 0x1, 0xe2, 0xd5, 0x0, 0x1f, 0xde, + 0x20, 0x1, 0xf2, 0x5d, 0x0, 0x1e, 0x0, 0x7b, + 0x0, + + /* U+6C "l" */ + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, + + /* U+6D "m" */ + 0x1e, 0xab, 0xc5, 0xbb, 0xc2, 0x1f, 0x20, 0x5f, + 0x10, 0x69, 0x1e, 0x0, 0x2c, 0x0, 0x4b, 0x1e, + 0x0, 0x2c, 0x0, 0x4b, 0x1e, 0x0, 0x2c, 0x0, + 0x4b, + + /* U+6E "n" */ + 0x1e, 0xab, 0xc4, 0x1f, 0x20, 0x3d, 0x1e, 0x0, + 0xe, 0x1e, 0x0, 0xf, 0x1e, 0x0, 0xf, + + /* U+6F "o" */ + 0x7, 0xdd, 0xb1, 0x5c, 0x0, 0x7b, 0x87, 0x0, + 0x1e, 0x5c, 0x0, 0x7b, 0x7, 0xdd, 0xb1, + + /* U+70 "p" */ + 0x1e, 0xab, 0xd6, 0x1, 0xf3, 0x1, 0xd2, 0x1e, + 0x0, 0xa, 0x51, 0xf4, 0x1, 0xe2, 0x1e, 0xac, + 0xd5, 0x1, 0xe0, 0x0, 0x0, 0x1e, 0x0, 0x0, + 0x0, + + /* U+71 "q" */ + 0x8, 0xdc, 0x8e, 0x5c, 0x0, 0x7e, 0x87, 0x0, + 0x1e, 0x5c, 0x0, 0x7e, 0x8, 0xdc, 0x8e, 0x0, + 0x0, 0xe, 0x0, 0x0, 0xe, + + /* U+72 "r" */ + 0x1d, 0xaa, 0x1f, 0x30, 0x1e, 0x0, 0x1e, 0x0, + 0x1e, 0x0, + + /* U+73 "s" */ + 0x2c, 0xcc, 0x48, 0x80, 0x0, 0x2a, 0xca, 0x21, + 0x0, 0x6a, 0x6c, 0xcc, 0x30, + + /* U+74 "t" */ + 0xf, 0x0, 0x9f, 0xb6, 0xf, 0x0, 0xf, 0x0, + 0xe, 0x10, 0x7, 0xd9, + + /* U+75 "u" */ + 0x2d, 0x0, 0x1d, 0x2d, 0x0, 0x1d, 0x2d, 0x0, + 0x1d, 0xe, 0x10, 0x6d, 0x6, 0xdb, 0x9d, + + /* U+76 "v" */ + 0xc, 0x30, 0x9, 0x50, 0x5a, 0x1, 0xd0, 0x0, + 0xd2, 0x86, 0x0, 0x6, 0x9d, 0x0, 0x0, 0xe, + 0x80, 0x0, + + /* U+77 "w" */ + 0xb2, 0x1, 0xf1, 0x2, 0xb5, 0x80, 0x7b, 0x80, + 0x85, 0xd, 0xd, 0x1d, 0xd, 0x0, 0x89, 0x90, + 0x99, 0x80, 0x2, 0xf2, 0x2, 0xf2, 0x0, + + /* U+78 "x" */ + 0x5b, 0x3, 0xc0, 0x8, 0x9c, 0x10, 0x0, 0xe7, + 0x0, 0xa, 0x7c, 0x20, 0x79, 0x2, 0xd1, + + /* U+79 "y" */ + 0xc, 0x30, 0x9, 0x50, 0x5a, 0x1, 0xd0, 0x0, + 0xd2, 0x77, 0x0, 0x6, 0x9d, 0x0, 0x0, 0xe, + 0x80, 0x0, 0x0, 0xd1, 0x0, 0xc, 0xd6, 0x0, + 0x0, + + /* U+7A "z" */ + 0x6b, 0xbe, 0xb0, 0x2, 0xd1, 0x1, 0xd2, 0x0, + 0xc4, 0x0, 0x8e, 0xbb, 0x90, + + /* U+7B "{" */ + 0x4, 0xd3, 0x9, 0x50, 0xa, 0x50, 0xa, 0x40, + 0x5f, 0x10, 0xa, 0x40, 0xa, 0x50, 0x9, 0x50, + 0x4, 0xd3, + + /* U+7C "|" */ + 0xee, 0xee, 0xee, 0xee, 0xe0, + + /* U+7D "}" */ + 0xab, 0x0, 0xd2, 0xd, 0x20, 0xc2, 0x9, 0xc0, + 0xc2, 0xd, 0x20, 0xd2, 0xab, 0x0, + + /* U+7E "~" */ + 0x1a, 0x91, 0x62, 0x44, 0x29, 0x90, + + /* U+B0 "Ā°" */ + 0x7, 0x81, 0x62, 0x8, 0x62, 0x8, 0x7, 0x81, + + /* U+2022 "ā€¢" */ + 0x19, 0x23, 0xe4, + + /* U+F001 "ļ€" */ + 0x0, 0x0, 0x0, 0x4, 0x9c, 0x10, 0x0, 0x16, + 0xbf, 0xff, 0xf2, 0x0, 0x3f, 0xff, 0xff, 0xff, + 0x20, 0x5, 0xff, 0xd9, 0x41, 0xf2, 0x0, 0x5f, + 0x20, 0x0, 0x1f, 0x20, 0x5, 0xe0, 0x0, 0x1, + 0xf2, 0x0, 0x5e, 0x0, 0x7, 0x9f, 0x20, 0x48, + 0xe0, 0x7, 0xff, 0xf2, 0xaf, 0xfe, 0x0, 0x2b, + 0xd8, 0x7, 0xff, 0x90, 0x0, 0x0, 0x0, 0x1, + 0x10, 0x0, 0x0, 0x0, 0x0, + + /* U+F008 "ļ€ˆ" */ + 0x41, 0x88, 0x88, 0x88, 0x14, 0xeb, 0xe7, 0x77, + 0x7e, 0xbe, 0xa2, 0xd0, 0x0, 0xd, 0x2a, 0xeb, + 0xe3, 0x33, 0x3e, 0xbe, 0xb4, 0xfb, 0xbb, 0xbf, + 0x4b, 0xd9, 0xd0, 0x0, 0xd, 0x9d, 0xb5, 0xd0, + 0x0, 0xd, 0x5b, 0xb7, 0xff, 0xff, 0xff, 0x7b, + + /* U+F00B "ļ€‹" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xd6, 0xff, + 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, 0xff, 0x67, + 0x52, 0x77, 0x77, 0x76, 0xef, 0xc6, 0xff, 0xff, + 0xfe, 0xff, 0xe7, 0xff, 0xff, 0xff, 0x67, 0x52, + 0x77, 0x77, 0x76, 0xef, 0xc6, 0xff, 0xff, 0xfe, + 0xff, 0xe7, 0xff, 0xff, 0xff, 0x78, 0x63, 0x88, + 0x88, 0x87, + + /* U+F00C "ļ€Œ" */ + 0x0, 0x0, 0x0, 0x0, 0x41, 0x0, 0x0, 0x0, + 0x6, 0xfd, 0x0, 0x0, 0x0, 0x6f, 0xf7, 0x7c, + 0x10, 0x6, 0xff, 0x70, 0xdf, 0xd1, 0x6f, 0xf7, + 0x0, 0x1d, 0xfe, 0xff, 0x70, 0x0, 0x1, 0xdf, + 0xf7, 0x0, 0x0, 0x0, 0x1c, 0x60, 0x0, 0x0, + + /* U+F00D "ļ€" */ + 0x0, 0x0, 0x0, 0xc, 0xd1, 0x2, 0xea, 0xaf, + 0xd4, 0xef, 0x80, 0xaf, 0xff, 0x80, 0x2, 0xff, + 0xf1, 0x2, 0xef, 0xdf, 0xd1, 0xdf, 0x80, 0xaf, + 0xb6, 0x70, 0x0, 0x85, + + /* U+F011 "ļ€‘" */ + 0x0, 0x0, 0xa6, 0x0, 0x0, 0x2, 0xa0, 0xea, + 0x29, 0x0, 0xe, 0xe1, 0xea, 0x5f, 0xa0, 0x7f, + 0x40, 0xea, 0x8, 0xf3, 0xbd, 0x0, 0xea, 0x1, + 0xf7, 0xcc, 0x0, 0xb7, 0x0, 0xf8, 0xaf, 0x0, + 0x0, 0x4, 0xf6, 0x4f, 0xa0, 0x0, 0x1d, 0xf1, + 0x9, 0xfd, 0x89, 0xef, 0x50, 0x0, 0x6d, 0xff, + 0xc4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F013 "ļ€“" */ + 0x0, 0x1, 0x88, 0x10, 0x0, 0x0, 0x5, 0xff, + 0x40, 0x0, 0x1e, 0xcf, 0xff, 0xfc, 0xd0, 0x7f, + 0xff, 0xdd, 0xff, 0xf7, 0x2d, 0xfa, 0x0, 0xbf, + 0xd1, 0xb, 0xf7, 0x0, 0x8f, 0xa0, 0x6f, 0xfe, + 0x55, 0xef, 0xf6, 0x4f, 0xff, 0xff, 0xff, 0xf3, + 0x6, 0x3a, 0xff, 0xa3, 0x60, 0x0, 0x3, 0xff, + 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F015 "ļ€•" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x6f, 0x90, 0xf8, 0x0, 0x0, 0x9, 0xf8, 0xec, + 0xf8, 0x0, 0x1, 0xbe, 0x5a, 0x5c, 0xf8, 0x0, + 0x2d, 0xd5, 0xef, 0xf6, 0xaf, 0x50, 0xda, 0x6f, + 0xff, 0xff, 0x87, 0xf1, 0x11, 0xff, 0xff, 0xff, + 0xf5, 0x10, 0x2, 0xff, 0xc3, 0x9f, 0xf6, 0x0, + 0x2, 0xff, 0xb0, 0x7f, 0xf6, 0x0, 0x1, 0xbb, + 0x70, 0x4b, 0xb3, 0x0, + + /* U+F019 "ļ€™" */ + 0x0, 0x0, 0x88, 0x20, 0x0, 0x0, 0x1, 0xff, + 0x60, 0x0, 0x0, 0x1, 0xff, 0x60, 0x0, 0x0, + 0x1, 0xff, 0x60, 0x0, 0x1, 0xff, 0xff, 0xff, + 0x60, 0x0, 0x5f, 0xff, 0xfa, 0x0, 0x0, 0x5, + 0xff, 0xb0, 0x0, 0x8b, 0xb9, 0x8b, 0x8b, 0xb9, + 0xdf, 0xff, 0xff, 0xfe, 0xdf, 0xcf, 0xff, 0xff, + 0xfc, 0xbe, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F01C "ļ€œ" */ + 0x0, 0x24, 0x44, 0x44, 0x30, 0x0, 0x1, 0xef, + 0xff, 0xff, 0xf4, 0x0, 0xb, 0xc0, 0x0, 0x0, + 0x8e, 0x10, 0x6e, 0x10, 0x0, 0x0, 0xc, 0xa0, + 0xee, 0xcb, 0x10, 0xa, 0xcd, 0xf2, 0xff, 0xff, + 0xb8, 0x9f, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xe1, + + /* U+F021 "ļ€”" */ + 0x0, 0x4, 0x87, 0x30, 0x5f, 0x2, 0xdf, 0xfe, + 0xfc, 0x7f, 0x1e, 0xd3, 0x0, 0x3c, 0xff, 0x9f, + 0x10, 0x5, 0xfe, 0xff, 0x44, 0x0, 0x2, 0x66, + 0x66, 0x12, 0x22, 0x0, 0x0, 0x11, 0xff, 0xff, + 0x50, 0x0, 0xda, 0xff, 0xa3, 0x10, 0x8, 0xf4, + 0xfc, 0xfb, 0x66, 0xbf, 0x80, 0xf5, 0x5c, 0xff, + 0xd5, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, + + /* U+F026 "ļ€¦" */ + 0x0, 0x0, 0x70, 0x0, 0xbf, 0xab, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x3e, 0xf0, 0x0, 0x2c, + + /* U+F027 "ļ€§" */ + 0x0, 0x0, 0x70, 0x0, 0x0, 0xb, 0xf0, 0x0, + 0xab, 0xdf, 0xf0, 0x20, 0xff, 0xff, 0xf0, 0xa6, + 0xff, 0xff, 0xf0, 0x59, 0xff, 0xff, 0xf0, 0x92, + 0x0, 0x3e, 0xf0, 0x0, 0x0, 0x2, 0xc0, 0x0, + + /* U+F028 "ļ€Ø" */ + 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, + 0x70, 0x0, 0xaa, 0x0, 0x0, 0xb, 0xf0, 0xa, + 0x4a, 0x70, 0xab, 0xdf, 0xf0, 0x23, 0xe2, 0xe0, + 0xff, 0xff, 0xf0, 0xa6, 0x95, 0xc2, 0xff, 0xff, + 0xf0, 0x59, 0x76, 0xc3, 0xff, 0xff, 0xf0, 0x92, + 0xc3, 0xe1, 0x0, 0x3e, 0xf0, 0x9, 0xa6, 0xb0, + 0x0, 0x2, 0xc0, 0x3, 0x3e, 0x20, 0x0, 0x0, + 0x0, 0x0, 0xc3, 0x0, + + /* U+F03E "ļ€¾" */ + 0x24, 0x44, 0x44, 0x44, 0x42, 0xff, 0xef, 0xff, + 0xff, 0xff, 0xf3, 0xd, 0xff, 0xef, 0xff, 0xf8, + 0x4e, 0xfe, 0x25, 0xff, 0xff, 0x9d, 0xe2, 0x0, + 0x6f, 0xf9, 0x1, 0x20, 0x0, 0x4f, 0xf7, 0x44, + 0x44, 0x44, 0x7f, 0xcf, 0xff, 0xff, 0xff, 0xfc, + + /* U+F048 "ļˆ" */ + 0x0, 0x0, 0x0, 0xe, 0x70, 0x3, 0xe4, 0xe7, + 0x4, 0xff, 0x5e, 0x75, 0xff, 0xf5, 0xec, 0xff, + 0xff, 0x5e, 0xff, 0xff, 0xf5, 0xea, 0xef, 0xff, + 0x5e, 0x71, 0xdf, 0xf5, 0xe7, 0x1, 0xcf, 0x59, + 0x50, 0x0, 0x92, + + /* U+F04B "ļ‹" */ + 0x88, 0x0, 0x0, 0x0, 0xf, 0xfe, 0x50, 0x0, + 0x0, 0xff, 0xff, 0xc3, 0x0, 0xf, 0xff, 0xff, + 0xf9, 0x10, 0xff, 0xff, 0xff, 0xfe, 0x5f, 0xff, + 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff, 0xf8, 0xf, + 0xff, 0xff, 0xb2, 0x0, 0xff, 0xfd, 0x40, 0x0, + 0xe, 0xf7, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, + 0x0, 0x0, + + /* U+F04C "ļŒ" */ + 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, 0x90, 0xdf, + 0xf9, 0xff, 0xfc, 0xf, 0xff, 0xcf, 0xff, 0xc0, + 0xff, 0xfc, 0xff, 0xfc, 0xf, 0xff, 0xcf, 0xff, + 0xc0, 0xff, 0xfc, 0xff, 0xfc, 0xf, 0xff, 0xcf, + 0xff, 0xc0, 0xff, 0xfc, 0xff, 0xfb, 0xf, 0xff, + 0xb8, 0xbb, 0x50, 0x8b, 0xb5, + + /* U+F04D "ļ" */ + 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, 0xff, 0xff, + 0xf9, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, + 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, + 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xcf, + 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, + 0xb8, 0xbb, 0xbb, 0xbb, 0xb5, + + /* U+F051 "ļ‘" */ + 0x0, 0x0, 0x0, 0xb, 0xa0, 0x0, 0xe7, 0xcf, + 0xb0, 0xe, 0x7c, 0xff, 0xc1, 0xe7, 0xcf, 0xff, + 0xdf, 0x7c, 0xff, 0xff, 0xf7, 0xcf, 0xff, 0x9e, + 0x7c, 0xff, 0x70, 0xe7, 0xcf, 0x60, 0xe, 0x77, + 0x50, 0x0, 0x95, + + /* U+F052 "ļ’" */ + 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0xaf, + 0x60, 0x0, 0x0, 0x9, 0xff, 0xf5, 0x0, 0x0, + 0x8f, 0xff, 0xff, 0x40, 0x6, 0xff, 0xff, 0xff, + 0xf3, 0xe, 0xff, 0xff, 0xff, 0xfa, 0x3, 0x66, + 0x66, 0x66, 0x62, 0xd, 0xff, 0xff, 0xff, 0xf9, + 0xf, 0xff, 0xff, 0xff, 0xfb, 0x6, 0x88, 0x88, + 0x88, 0x84, + + /* U+F053 "ļ“" */ + 0x0, 0x0, 0x0, 0x0, 0x1, 0xc7, 0x0, 0x1d, + 0xf5, 0x1, 0xdf, 0x50, 0x1d, 0xf5, 0x0, 0x4f, + 0xd0, 0x0, 0x6, 0xfc, 0x0, 0x0, 0x6f, 0xc0, + 0x0, 0x6, 0xf9, 0x0, 0x0, 0x51, + + /* U+F054 "ļ”" */ + 0x0, 0x0, 0x0, 0x3e, 0x30, 0x0, 0x2e, 0xf3, + 0x0, 0x2, 0xef, 0x30, 0x0, 0x2e, 0xe3, 0x0, + 0x9, 0xf8, 0x0, 0x8f, 0xa0, 0x8, 0xfa, 0x0, + 0x5f, 0xa0, 0x0, 0x6, 0x0, 0x0, + + /* U+F067 "ļ§" */ + 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x8f, 0x40, + 0x0, 0x0, 0x9, 0xf5, 0x0, 0x0, 0x0, 0x9f, + 0x50, 0x0, 0x9b, 0xbd, 0xfc, 0xbb, 0x6f, 0xff, + 0xff, 0xff, 0xfb, 0x13, 0x3a, 0xf7, 0x33, 0x10, + 0x0, 0x9f, 0x50, 0x0, 0x0, 0x9, 0xf5, 0x0, + 0x0, 0x0, 0x39, 0x10, 0x0, + + /* U+F068 "ļØ" */ + 0xbd, 0xdd, 0xdd, 0xdd, 0x8e, 0xff, 0xff, 0xff, + 0xfa, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F06E "ļ®" */ + 0x0, 0x4, 0x8a, 0x95, 0x0, 0x0, 0x1, 0xcf, + 0x84, 0x6e, 0xe3, 0x0, 0x1e, 0xf5, 0x8, 0x72, + 0xff, 0x40, 0xbf, 0xe0, 0x2d, 0xf5, 0xbf, 0xe0, + 0xdf, 0xe3, 0xff, 0xf6, 0xaf, 0xf1, 0x4f, 0xf3, + 0xaf, 0xd1, 0xef, 0x70, 0x5, 0xfd, 0x31, 0x2b, + 0xf7, 0x0, 0x0, 0x19, 0xdf, 0xea, 0x30, 0x0, + + /* U+F070 "ļ°" */ + 0xb6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xfa, + 0x16, 0xaa, 0x83, 0x0, 0x0, 0x3, 0xef, 0xe6, + 0x49, 0xfb, 0x0, 0x0, 0x1, 0xbe, 0x49, 0x28, + 0xfd, 0x0, 0x1d, 0x40, 0x8f, 0xfe, 0x1f, 0xf9, + 0x4, 0xff, 0x50, 0x5f, 0xf1, 0xff, 0xb0, 0xa, + 0xfc, 0x0, 0x2d, 0xdf, 0xf2, 0x0, 0xa, 0xfa, + 0x10, 0x1b, 0xf7, 0x0, 0x0, 0x4, 0xbe, 0xe4, + 0x8, 0xf7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, + 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, + + /* U+F071 "ļ±" */ + 0x0, 0x0, 0x2, 0xe6, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xbf, 0xe1, 0x0, 0x0, 0x0, 0x0, 0x4f, + 0xff, 0x90, 0x0, 0x0, 0x0, 0xd, 0xe7, 0xcf, + 0x20, 0x0, 0x0, 0x7, 0xfc, 0x8, 0xfb, 0x0, + 0x0, 0x1, 0xef, 0xd0, 0x9f, 0xf4, 0x0, 0x0, + 0x9f, 0xff, 0x5c, 0xff, 0xd0, 0x0, 0x2f, 0xff, + 0xe1, 0xaf, 0xff, 0x60, 0xb, 0xff, 0xfe, 0x2b, + 0xff, 0xfe, 0x0, 0xef, 0xff, 0xff, 0xff, 0xff, + 0xf2, 0x1, 0x33, 0x33, 0x33, 0x33, 0x32, 0x0, + + /* U+F074 "ļ“" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x7, 0xc1, 0xef, 0xd1, 0x3, 0xef, 0xfc, 0x99, + 0xfb, 0x2e, 0xec, 0xf8, 0x0, 0x54, 0xde, 0x25, + 0x70, 0x0, 0xc, 0xf4, 0x1, 0x10, 0x0, 0xbf, + 0x5c, 0x78, 0xd1, 0xff, 0xf6, 0xa, 0xff, 0xfd, + 0x78, 0x60, 0x0, 0x7c, 0xf6, 0x0, 0x0, 0x0, + 0x5, 0x60, + + /* U+F077 "ļ·" */ + 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0xaf, 0x60, + 0x0, 0x0, 0xaf, 0xef, 0x60, 0x0, 0xaf, 0x90, + 0xcf, 0x60, 0x9f, 0x80, 0x0, 0xcf, 0x57, 0x80, + 0x0, 0x0, 0xa4, + + /* U+F078 "ļø" */ + 0x11, 0x0, 0x0, 0x2, 0xc, 0xe2, 0x0, 0x5, + 0xf8, 0x3f, 0xe2, 0x5, 0xfd, 0x10, 0x3f, 0xe7, + 0xfd, 0x10, 0x0, 0x3f, 0xfd, 0x10, 0x0, 0x0, + 0x3b, 0x10, 0x0, + + /* U+F079 "ļ¹" */ + 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, + 0xc3, 0xff, 0xff, 0xf5, 0x0, 0xbe, 0xfe, 0xb3, + 0x44, 0x4e, 0x60, 0x4, 0x3f, 0x34, 0x0, 0x0, + 0xd6, 0x0, 0x2, 0xf2, 0x0, 0x0, 0xd, 0x60, + 0x0, 0x2f, 0x20, 0x0, 0x8c, 0xea, 0xf1, 0x1, + 0xff, 0xff, 0xf7, 0xdf, 0xf7, 0x0, 0x4, 0x44, + 0x44, 0x11, 0xc7, 0x0, + + /* U+F07B "ļ»" */ + 0x58, 0x88, 0x20, 0x0, 0x0, 0xff, 0xff, 0xe4, + 0x44, 0x41, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xfc, + + /* U+F093 "ļ‚“" */ + 0x0, 0x0, 0x33, 0x0, 0x0, 0x0, 0x3, 0xff, + 0x40, 0x0, 0x0, 0x3f, 0xff, 0xf4, 0x0, 0x2, + 0xff, 0xff, 0xff, 0x20, 0x0, 0x36, 0xff, 0x63, + 0x0, 0x0, 0x4, 0xff, 0x40, 0x0, 0x0, 0x4, + 0xff, 0x40, 0x0, 0x9a, 0xa5, 0xff, 0x5a, 0xa9, + 0xff, 0xff, 0xdd, 0xfe, 0xdf, 0xff, 0xff, 0xff, + 0xfc, 0xbe, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F095 "ļ‚•" */ + 0x0, 0x0, 0x0, 0x0, 0xa8, 0x40, 0x0, 0x0, + 0x0, 0x5f, 0xff, 0x0, 0x0, 0x0, 0xc, 0xff, + 0xe0, 0x0, 0x0, 0x0, 0x6f, 0xfa, 0x0, 0x0, + 0x0, 0x0, 0xcf, 0x50, 0x0, 0x0, 0x0, 0x5f, + 0xd0, 0x0, 0x39, 0x10, 0x4f, 0xf4, 0x0, 0xbf, + 0xfc, 0x9f, 0xf6, 0x0, 0xd, 0xff, 0xff, 0xe4, + 0x0, 0x0, 0x9f, 0xfd, 0x81, 0x0, 0x0, 0x1, + 0x31, 0x0, 0x0, 0x0, 0x0, + + /* U+F0C4 "ļƒ„" */ + 0x0, 0x0, 0x0, 0x0, 0x6, 0xfe, 0x30, 0x5, + 0xc6, 0xe7, 0xbb, 0x5, 0xff, 0x4d, 0xbd, 0xb4, + 0xff, 0x40, 0x3c, 0xff, 0xff, 0x40, 0x0, 0x8, + 0xff, 0xb0, 0x0, 0x6f, 0xff, 0xdf, 0x80, 0xe, + 0x7b, 0xb2, 0xef, 0x80, 0xdb, 0xd9, 0x2, 0xef, + 0x73, 0xca, 0x10, 0x2, 0x72, + + /* U+F0C5 "ļƒ…" */ + 0x0, 0x5d, 0xdd, 0x48, 0x0, 0x8, 0xff, 0xf6, + 0xf8, 0xcc, 0x8f, 0xff, 0x84, 0x3f, 0xe8, 0xff, + 0xff, 0xfc, 0xfe, 0x8f, 0xff, 0xff, 0xcf, 0xe8, + 0xff, 0xff, 0xfc, 0xfe, 0x8f, 0xff, 0xff, 0xcf, + 0xe7, 0xff, 0xff, 0xfc, 0xff, 0x46, 0x66, 0x66, + 0x3f, 0xff, 0xff, 0xf4, 0x0, 0x34, 0x44, 0x43, + 0x0, 0x0, + + /* U+F0C7 "ļƒ‡" */ + 0x2, 0x22, 0x22, 0x0, 0xe, 0xff, 0xff, 0xfe, + 0x20, 0xf5, 0x22, 0x22, 0xfe, 0x1f, 0x40, 0x0, + 0xe, 0xf8, 0xf7, 0x44, 0x44, 0xff, 0x9f, 0xff, + 0xff, 0xff, 0xf9, 0xff, 0xf6, 0xc, 0xff, 0x9f, + 0xff, 0x20, 0x9f, 0xf9, 0xff, 0xfc, 0x7f, 0xff, + 0x9a, 0xdd, 0xdd, 0xdd, 0xd4, + + /* U+F0E7 "ļƒ§" */ + 0x3, 0xaa, 0xa2, 0x0, 0x7, 0xff, 0xf2, 0x0, + 0x9, 0xff, 0xd0, 0x0, 0xb, 0xff, 0xd8, 0x81, + 0xe, 0xff, 0xff, 0xe1, 0xe, 0xff, 0xff, 0x60, + 0x0, 0x5, 0xfd, 0x0, 0x0, 0x9, 0xf4, 0x0, + 0x0, 0xd, 0xa0, 0x0, 0x0, 0xf, 0x20, 0x0, + 0x0, 0x2, 0x0, 0x0, + + /* U+F0EA "ļƒŖ" */ + 0x1, 0x79, 0x11, 0x0, 0xf, 0xfc, 0x9f, 0xf4, + 0x0, 0xff, 0xfd, 0xcc, 0x30, 0xf, 0xfa, 0x79, + 0x93, 0x40, 0xff, 0x8e, 0xff, 0x6f, 0x5f, 0xf8, + 0xef, 0xf7, 0x64, 0xff, 0x8e, 0xff, 0xff, 0xcf, + 0xf8, 0xef, 0xff, 0xfc, 0x46, 0x3e, 0xff, 0xff, + 0xc0, 0x0, 0xdf, 0xff, 0xfc, 0x0, 0x2, 0x44, + 0x44, 0x20, + + /* U+F0F3 "ļƒ³" */ + 0x0, 0x1, 0x90, 0x0, 0x0, 0x2, 0xaf, 0x81, + 0x0, 0x2, 0xff, 0xff, 0xd0, 0x0, 0x9f, 0xff, + 0xff, 0x50, 0xc, 0xff, 0xff, 0xf8, 0x0, 0xef, + 0xff, 0xff, 0xa0, 0x3f, 0xff, 0xff, 0xfe, 0xd, + 0xff, 0xff, 0xff, 0xf9, 0x46, 0x66, 0x66, 0x66, + 0x20, 0x0, 0xbf, 0x70, 0x0, 0x0, 0x0, 0x30, + 0x0, 0x0, + + /* U+F11C "ļ„œ" */ + 0x24, 0x44, 0x44, 0x44, 0x44, 0x30, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf3, 0xf4, 0xa0, 0xa0, 0xb0, + 0xb0, 0xf4, 0xff, 0xbe, 0xae, 0xae, 0xaf, 0xf4, + 0xff, 0x3a, 0xa, 0xa, 0xf, 0xf4, 0xfb, 0xea, + 0xaa, 0xaa, 0xea, 0xf4, 0xf7, 0xb4, 0x44, 0x44, + 0xc4, 0xf4, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xe1, + + /* U+F124 "ļ„¤" */ + 0x0, 0x0, 0x0, 0x0, 0x29, 0x70, 0x0, 0x0, + 0x0, 0x3a, 0xff, 0xe0, 0x0, 0x0, 0x4b, 0xff, + 0xff, 0x70, 0x0, 0x5d, 0xff, 0xff, 0xff, 0x10, + 0xc, 0xff, 0xff, 0xff, 0xf9, 0x0, 0xa, 0xee, + 0xef, 0xff, 0xf2, 0x0, 0x0, 0x0, 0xa, 0xff, + 0xa0, 0x0, 0x0, 0x0, 0xa, 0xff, 0x30, 0x0, + 0x0, 0x0, 0xa, 0xfb, 0x0, 0x0, 0x0, 0x0, + 0x8, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, + 0x0, 0x0, + + /* U+F15B "ļ…›" */ + 0xef, 0xff, 0x5b, 0x0, 0xff, 0xff, 0x6f, 0xb0, + 0xff, 0xff, 0x68, 0x83, 0xff, 0xff, 0xfd, 0xd6, + 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf8, + 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf8, + 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf7, + 0x0, 0x0, 0x0, 0x0, + + /* U+F1EB "ļ‡«" */ + 0x0, 0x0, 0x1, 0x10, 0x0, 0x0, 0x0, 0x5, + 0xbf, 0xff, 0xfd, 0x81, 0x0, 0x2c, 0xfe, 0xa8, + 0x78, 0xcf, 0xf7, 0xd, 0xf7, 0x0, 0x0, 0x0, + 0x3c, 0xf5, 0x22, 0x5, 0xbe, 0xfd, 0x81, 0x5, + 0x0, 0x9, 0xfe, 0xa9, 0xcf, 0xe2, 0x0, 0x0, + 0x37, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, + 0x8c, 0x20, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf7, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x58, 0x10, 0x0, + 0x0, + + /* U+F240 "ļ‰€" */ + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf, 0x75, + 0x55, 0x55, 0x55, 0x5a, 0xf2, 0xf6, 0xff, 0xff, + 0xff, 0xfd, 0x4f, 0x5f, 0x6f, 0xff, 0xff, 0xff, + 0xd1, 0xf5, 0xf5, 0x77, 0x77, 0x77, 0x76, 0x8f, + 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x24, + 0x44, 0x44, 0x44, 0x44, 0x41, 0x0, + + /* U+F241 "ļ‰" */ + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf, 0x75, + 0x55, 0x55, 0x54, 0x4a, 0xf2, 0xf6, 0xff, 0xff, + 0xff, 0x0, 0x4f, 0x5f, 0x6f, 0xff, 0xff, 0xf0, + 0x1, 0xf5, 0xf5, 0x77, 0x77, 0x77, 0x0, 0x8f, + 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x24, + 0x44, 0x44, 0x44, 0x44, 0x41, 0x0, + + /* U+F242 "ļ‰‚" */ + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf, 0x75, + 0x55, 0x54, 0x44, 0x4a, 0xf2, 0xf6, 0xff, 0xff, + 0x20, 0x0, 0x4f, 0x5f, 0x6f, 0xff, 0xf2, 0x0, + 0x1, 0xf5, 0xf5, 0x77, 0x77, 0x10, 0x0, 0x8f, + 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x24, + 0x44, 0x44, 0x44, 0x44, 0x41, 0x0, + + /* U+F243 "ļ‰ƒ" */ + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf, 0x75, + 0x54, 0x44, 0x44, 0x4a, 0xf2, 0xf6, 0xff, 0x50, + 0x0, 0x0, 0x4f, 0x5f, 0x6f, 0xf5, 0x0, 0x0, + 0x1, 0xf5, 0xf5, 0x77, 0x20, 0x0, 0x0, 0x8f, + 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x24, + 0x44, 0x44, 0x44, 0x44, 0x41, 0x0, + + /* U+F244 "ļ‰„" */ + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xf, 0x74, + 0x44, 0x44, 0x44, 0x4a, 0xf2, 0xf4, 0x0, 0x0, + 0x0, 0x0, 0x4f, 0x5f, 0x40, 0x0, 0x0, 0x0, + 0x1, 0xf5, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x8f, + 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x24, + 0x44, 0x44, 0x44, 0x44, 0x41, 0x0, + + /* U+F287 "ļŠ‡" */ + 0x0, 0x0, 0x0, 0x5b, 0x10, 0x0, 0x0, 0x0, + 0x3, 0xbd, 0xf4, 0x0, 0x0, 0x0, 0x0, 0xa1, + 0x3, 0x0, 0x0, 0xa, 0xf7, 0x39, 0x0, 0x0, + 0x7, 0x60, 0xff, 0xea, 0xbf, 0xaa, 0xaa, 0xdf, + 0x45, 0xa3, 0x0, 0x93, 0x0, 0x4, 0x10, 0x0, + 0x0, 0x1, 0xb8, 0xfb, 0x0, 0x0, 0x0, 0x0, + 0x2, 0x9f, 0xb0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x10, 0x0, 0x0, + + /* U+F293 "ļŠ“" */ + 0x0, 0x6b, 0xca, 0x40, 0x0, 0x9f, 0xf6, 0xff, + 0x40, 0x1f, 0xff, 0x26, 0xfb, 0x4, 0xf6, 0xb4, + 0x6b, 0xf0, 0x6f, 0xf4, 0x6, 0xff, 0x6, 0xff, + 0x90, 0xbf, 0xf0, 0x5f, 0x95, 0x34, 0xcf, 0x2, + 0xfb, 0xf3, 0x4d, 0xc0, 0xc, 0xff, 0x3d, 0xf7, + 0x0, 0x1b, 0xfe, 0xf9, 0x0, 0x0, 0x0, 0x10, + 0x0, 0x0, + + /* U+F2ED "ļ‹­" */ + 0x12, 0x3b, 0xca, 0x22, 0x1f, 0xff, 0xff, 0xff, + 0xfb, 0x36, 0x66, 0x66, 0x66, 0x16, 0xff, 0xff, + 0xff, 0xf2, 0x6f, 0x6f, 0x6f, 0x7f, 0x26, 0xf6, + 0xf6, 0xf7, 0xf2, 0x6f, 0x6f, 0x6f, 0x7f, 0x26, + 0xf6, 0xf6, 0xf7, 0xf2, 0x6f, 0x6f, 0x6f, 0x7f, + 0x24, 0xff, 0xff, 0xff, 0xf1, 0x3, 0x44, 0x44, + 0x42, 0x0, + + /* U+F304 "ļŒ„" */ + 0x0, 0x0, 0x0, 0x0, 0x97, 0x0, 0x0, 0x0, + 0x0, 0x9f, 0xf8, 0x0, 0x0, 0x0, 0xa5, 0xef, + 0xe0, 0x0, 0x0, 0xbf, 0xe5, 0xd4, 0x0, 0x0, + 0xbf, 0xff, 0xe0, 0x0, 0x0, 0xbf, 0xff, 0xf4, + 0x0, 0x0, 0xbf, 0xff, 0xf4, 0x0, 0x0, 0xaf, + 0xff, 0xf4, 0x0, 0x0, 0xd, 0xff, 0xf4, 0x0, + 0x0, 0x0, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x2, + 0x20, 0x0, 0x0, 0x0, 0x0, + + /* U+F55A "ļ•š" */ + 0x0, 0x5, 0x88, 0x88, 0x88, 0x86, 0x0, 0x8, + 0xff, 0xff, 0xff, 0xff, 0xf6, 0x8, 0xff, 0xf9, + 0x6f, 0x69, 0xff, 0x88, 0xff, 0xff, 0xc1, 0x21, + 0xcf, 0xf8, 0xdf, 0xff, 0xff, 0x50, 0x5f, 0xff, + 0x82, 0xef, 0xff, 0x71, 0x91, 0x7f, 0xf8, 0x2, + 0xef, 0xfe, 0xdf, 0xde, 0xff, 0x70, 0x2, 0xdf, + 0xff, 0xff, 0xff, 0xe3, + + /* U+F7C2 "ļŸ‚" */ + 0x1, 0xdf, 0xff, 0xe5, 0x1d, 0x6c, 0x5a, 0xab, + 0xdf, 0x3b, 0x18, 0x8b, 0xff, 0xdf, 0xde, 0xeb, + 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, + 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, + 0xff, 0xff, 0xff, 0xfb, 0xbf, 0xff, 0xff, 0xf6, + 0x0, 0x0, 0x0, 0x0, + + /* U+F8A2 "ļ¢¢" */ + 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x8, 0x10, + 0x0, 0x7, 0xf0, 0xb, 0xf2, 0x0, 0x0, 0x8f, + 0xb, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xfa, + 0x99, 0x99, 0x99, 0x0, 0x6f, 0x20, 0x0, 0x0, + 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 43, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 43, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7, .adv_w = 63, .box_w = 4, .box_h = 3, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 13, .adv_w = 112, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 38, .adv_w = 99, .box_w = 6, .box_h = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 65, .adv_w = 135, .box_w = 9, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 97, .adv_w = 110, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 125, .adv_w = 34, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 128, .adv_w = 54, .box_w = 4, .box_h = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 146, .adv_w = 54, .box_w = 3, .box_h = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 160, .adv_w = 64, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 168, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 183, .adv_w = 36, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 186, .adv_w = 61, .box_w = 4, .box_h = 1, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 188, .adv_w = 36, .box_w = 2, .box_h = 2, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 190, .adv_w = 56, .box_w = 5, .box_h = 9, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 213, .adv_w = 107, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 238, .adv_w = 59, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 249, .adv_w = 92, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 270, .adv_w = 92, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 291, .adv_w = 107, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 316, .adv_w = 92, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 337, .adv_w = 99, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 358, .adv_w = 96, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 379, .adv_w = 103, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 400, .adv_w = 99, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 421, .adv_w = 36, .box_w = 2, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 426, .adv_w = 36, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 433, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 448, .adv_w = 93, .box_w = 6, .box_h = 3, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 457, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 472, .adv_w = 92, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 493, .adv_w = 165, .box_w = 10, .box_h = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 538, .adv_w = 117, .box_w = 9, .box_h = 7, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 570, .adv_w = 121, .box_w = 7, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 595, .adv_w = 116, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 620, .adv_w = 132, .box_w = 7, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 645, .adv_w = 107, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 666, .adv_w = 102, .box_w = 5, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 684, .adv_w = 124, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 709, .adv_w = 130, .box_w = 7, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 734, .adv_w = 50, .box_w = 2, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 741, .adv_w = 82, .box_w = 6, .box_h = 7, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 762, .adv_w = 115, .box_w = 7, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 787, .adv_w = 95, .box_w = 5, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 805, .adv_w = 153, .box_w = 8, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 833, .adv_w = 130, .box_w = 7, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 858, .adv_w = 134, .box_w = 8, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 886, .adv_w = 116, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 907, .adv_w = 134, .box_w = 9, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 943, .adv_w = 116, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 964, .adv_w = 99, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 985, .adv_w = 94, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1006, .adv_w = 127, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1031, .adv_w = 114, .box_w = 9, .box_h = 7, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 1063, .adv_w = 180, .box_w = 11, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1102, .adv_w = 108, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1127, .adv_w = 104, .box_w = 8, .box_h = 7, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 1155, .adv_w = 105, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1180, .adv_w = 53, .box_w = 3, .box_h = 9, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 1194, .adv_w = 56, .box_w = 5, .box_h = 9, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 1217, .adv_w = 53, .box_w = 3, .box_h = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1231, .adv_w = 93, .box_w = 6, .box_h = 4, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 1243, .adv_w = 80, .box_w = 5, .box_h = 1, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1246, .adv_w = 96, .box_w = 3, .box_h = 1, .ofs_x = 1, .ofs_y = 6}, + {.bitmap_index = 1248, .adv_w = 96, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1263, .adv_w = 109, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1288, .adv_w = 91, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1303, .adv_w = 109, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1324, .adv_w = 98, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1339, .adv_w = 56, .box_w = 4, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1353, .adv_w = 110, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1374, .adv_w = 109, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1395, .adv_w = 45, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1406, .adv_w = 45, .box_w = 4, .box_h = 9, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 1424, .adv_w = 99, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1449, .adv_w = 45, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1456, .adv_w = 169, .box_w = 10, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1481, .adv_w = 109, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1496, .adv_w = 102, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1511, .adv_w = 109, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1536, .adv_w = 109, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1557, .adv_w = 66, .box_w = 4, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1567, .adv_w = 80, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1580, .adv_w = 66, .box_w = 4, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1592, .adv_w = 108, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1607, .adv_w = 89, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 1625, .adv_w = 144, .box_w = 9, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1648, .adv_w = 88, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1663, .adv_w = 89, .box_w = 7, .box_h = 7, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 1688, .adv_w = 83, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1701, .adv_w = 56, .box_w = 4, .box_h = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1719, .adv_w = 48, .box_w = 1, .box_h = 9, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 1724, .adv_w = 56, .box_w = 3, .box_h = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1738, .adv_w = 93, .box_w = 6, .box_h = 2, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 1744, .adv_w = 67, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 1752, .adv_w = 50, .box_w = 3, .box_h = 2, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 1755, .adv_w = 160, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1816, .adv_w = 160, .box_w = 10, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1856, .adv_w = 160, .box_w = 10, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1906, .adv_w = 160, .box_w = 10, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1946, .adv_w = 110, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1974, .adv_w = 160, .box_w = 10, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2029, .adv_w = 160, .box_w = 10, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2084, .adv_w = 180, .box_w = 12, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2144, .adv_w = 160, .box_w = 10, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2199, .adv_w = 180, .box_w = 12, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2247, .adv_w = 160, .box_w = 10, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2302, .adv_w = 80, .box_w = 5, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2322, .adv_w = 120, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2354, .adv_w = 180, .box_w = 12, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2414, .adv_w = 160, .box_w = 10, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2454, .adv_w = 140, .box_w = 7, .box_h = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2489, .adv_w = 140, .box_w = 9, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2539, .adv_w = 140, .box_w = 9, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2584, .adv_w = 140, .box_w = 9, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2629, .adv_w = 140, .box_w = 7, .box_h = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2664, .adv_w = 140, .box_w = 10, .box_h = 10, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 2714, .adv_w = 100, .box_w = 6, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2744, .adv_w = 100, .box_w = 6, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2774, .adv_w = 140, .box_w = 9, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2819, .adv_w = 140, .box_w = 9, .box_h = 3, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 2833, .adv_w = 180, .box_w = 12, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2881, .adv_w = 200, .box_w = 13, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2953, .adv_w = 180, .box_w = 13, .box_h = 11, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 3025, .adv_w = 160, .box_w = 10, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3075, .adv_w = 140, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 3102, .adv_w = 140, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 3129, .adv_w = 200, .box_w = 13, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3181, .adv_w = 160, .box_w = 10, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3221, .adv_w = 160, .box_w = 10, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3276, .adv_w = 160, .box_w = 11, .box_h = 11, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 3337, .adv_w = 140, .box_w = 9, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3382, .adv_w = 140, .box_w = 9, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3432, .adv_w = 140, .box_w = 9, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3477, .adv_w = 100, .box_w = 8, .box_h = 11, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 3521, .adv_w = 140, .box_w = 9, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3571, .adv_w = 140, .box_w = 9, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3621, .adv_w = 180, .box_w = 12, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3669, .adv_w = 160, .box_w = 12, .box_h = 11, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 3735, .adv_w = 120, .box_w = 8, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3779, .adv_w = 200, .box_w = 13, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3844, .adv_w = 200, .box_w = 13, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3890, .adv_w = 200, .box_w = 13, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3936, .adv_w = 200, .box_w = 13, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3982, .adv_w = 200, .box_w = 13, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4028, .adv_w = 200, .box_w = 13, .box_h = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4074, .adv_w = 200, .box_w = 13, .box_h = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4133, .adv_w = 140, .box_w = 9, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4183, .adv_w = 140, .box_w = 9, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4233, .adv_w = 160, .box_w = 11, .box_h = 11, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 4294, .adv_w = 200, .box_w = 13, .box_h = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4346, .adv_w = 120, .box_w = 8, .box_h = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4390, .adv_w = 161, .box_w = 11, .box_h = 7, .ofs_x = 0, .ofs_y = 0} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_1[] = { + 0x0, 0x1f72, 0xef51, 0xef58, 0xef5b, 0xef5c, 0xef5d, 0xef61, + 0xef63, 0xef65, 0xef69, 0xef6c, 0xef71, 0xef76, 0xef77, 0xef78, + 0xef8e, 0xef98, 0xef9b, 0xef9c, 0xef9d, 0xefa1, 0xefa2, 0xefa3, + 0xefa4, 0xefb7, 0xefb8, 0xefbe, 0xefc0, 0xefc1, 0xefc4, 0xefc7, + 0xefc8, 0xefc9, 0xefcb, 0xefe3, 0xefe5, 0xf014, 0xf015, 0xf017, + 0xf037, 0xf03a, 0xf043, 0xf06c, 0xf074, 0xf0ab, 0xf13b, 0xf190, + 0xf191, 0xf192, 0xf193, 0xf194, 0xf1d7, 0xf1e3, 0xf23d, 0xf254, + 0xf4aa, 0xf712, 0xf7f2 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = { + { + .range_start = 32, .range_length = 95, .glyph_id_start = 1, + .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY + }, + { + .range_start = 176, .range_length = 63475, .glyph_id_start = 96, + .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 59, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Map glyph_ids to kern left classes*/ +static const uint8_t kern_left_class_mapping[] = { + 0, 0, 1, 2, 0, 3, 4, 5, + 2, 6, 7, 8, 9, 10, 9, 10, + 11, 12, 0, 13, 14, 15, 16, 17, + 18, 19, 12, 20, 20, 0, 0, 0, + 21, 22, 23, 24, 25, 22, 26, 27, + 28, 29, 29, 30, 31, 32, 29, 29, + 22, 33, 34, 35, 3, 36, 30, 37, + 37, 38, 39, 40, 41, 42, 43, 0, + 44, 0, 45, 46, 47, 48, 49, 50, + 51, 45, 52, 52, 53, 48, 45, 45, + 46, 46, 54, 55, 56, 57, 51, 58, + 58, 59, 58, 60, 41, 0, 0, 9, + 61, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 +}; + +/*Map glyph_ids to kern right classes*/ +static const uint8_t kern_right_class_mapping[] = { + 0, 0, 1, 2, 0, 3, 4, 5, + 2, 6, 7, 8, 9, 10, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 12, + 18, 19, 20, 21, 21, 0, 0, 0, + 22, 23, 24, 25, 23, 25, 25, 25, + 23, 25, 25, 26, 25, 25, 25, 25, + 23, 25, 23, 25, 3, 27, 28, 29, + 29, 30, 31, 32, 33, 34, 35, 0, + 36, 0, 37, 38, 39, 39, 39, 0, + 39, 38, 40, 41, 38, 38, 42, 42, + 39, 42, 39, 42, 43, 44, 45, 46, + 46, 47, 46, 48, 0, 0, 35, 9, + 49, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 +}; + +/*Kern values between classes*/ +static const int8_t kern_class_values[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 0, 4, -4, 0, 0, + 0, 0, -9, -10, 1, 8, 4, 3, + -6, 1, 8, 0, 7, 2, 5, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 1, -1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, -5, 0, 0, 0, 0, + 0, -3, 3, 3, 0, 0, -2, 0, + -1, 2, 0, -2, 0, -2, -1, -3, + 0, 0, 0, 0, -2, 0, 0, -2, + -2, 0, 0, -2, 0, -3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -2, + -2, 0, -2, 0, -4, 0, -19, 0, + 0, -3, 0, 3, 5, 0, 0, -3, + 2, 2, 5, 3, -3, 3, 0, 0, + -9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -4, -2, -8, 0, -6, + -1, 0, 0, 0, 0, 0, 6, 0, + -5, -1, 0, 0, 0, -3, 0, 0, + -1, -12, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -13, -1, 6, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 5, + 0, 2, 0, 0, -3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 6, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, + 3, 2, 5, -2, 0, 0, 3, -2, + -5, -22, 1, 4, 3, 0, -2, 0, + 6, 0, 5, 0, 5, 0, -15, 0, + -2, 5, 0, 5, -2, 3, 2, 0, + 0, 0, -2, 0, 0, -3, 13, 0, + 13, 0, 5, 0, 7, 2, 3, 5, + 0, 0, 0, -6, 0, 0, 0, 0, + 0, -1, 0, 1, -3, -2, -3, 1, + 0, -2, 0, 0, 0, -6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -10, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -9, 0, -10, 0, 0, 0, + 0, -1, 0, 16, -2, -2, 2, 2, + -1, 0, -2, 2, 0, 0, -8, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -16, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -10, 0, 10, 0, 0, -6, 0, + 5, 0, -11, -16, -11, -3, 5, 0, + 0, -11, 0, 2, -4, 0, -2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 5, -20, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 8, 0, 1, 0, 0, 0, + 0, 0, 1, 1, -2, -3, 0, 0, + 0, -2, 0, 0, -1, 0, 0, 0, + -3, 0, -1, 0, -4, -3, 0, -4, + -5, -5, -3, 0, -3, 0, -3, 0, + 0, 0, 0, -1, 0, 0, 2, 0, + 1, -2, 0, 0, 0, 0, 0, 2, + -1, 0, 0, 0, -1, 2, 2, 0, + 0, 0, 0, -3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, -1, 0, + -2, 0, -3, 0, 0, -1, 0, 5, + 0, 0, -2, 0, 0, 0, 0, 0, + 0, 0, -1, -1, 0, 0, -2, 0, + -2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -1, -1, 0, -2, -2, 0, + 0, 0, 0, 0, 0, 0, 0, -1, + 0, -2, -2, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -1, 0, 0, + 0, 0, -1, -2, 0, -2, 0, -5, + -1, -5, 3, 0, 0, -3, 2, 3, + 4, 0, -4, 0, -2, 0, 0, -8, + 2, -1, 1, -8, 2, 0, 0, 0, + -8, 0, -8, -1, -14, -1, 0, -8, + 0, 3, 4, 0, 2, 0, 0, 0, + 0, 0, 0, -3, -2, 0, -5, 0, + 0, 0, -2, 0, 0, 0, -2, 0, + 0, 0, 0, 0, -1, -1, 0, -1, + -2, 0, 0, 0, 0, 0, 0, 0, + -2, -2, 0, -1, -2, -1, 0, 0, + -2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, -1, 0, -2, + 0, -1, 0, -3, 2, 0, 0, -2, + 1, 2, 2, 0, 0, 0, 0, 0, + 0, -1, 0, 0, 0, 0, 0, 1, + 0, 0, -2, 0, -2, -1, -2, 0, + 0, 0, 0, 0, 0, 0, 1, 0, + -1, 0, 0, 0, 0, -2, -2, 0, + -3, 0, 5, -1, 0, -5, 0, 0, + 4, -8, -8, -7, -3, 2, 0, -1, + -10, -3, 0, -3, 0, -3, 2, -3, + -10, 0, -4, 0, 0, 1, 0, 1, + -1, 0, 2, 0, -5, -6, 0, -8, + -4, -3, -4, -5, -2, -4, 0, -3, + -4, 1, 0, 0, 0, -2, 0, 0, + 0, 1, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -2, + 0, -1, 0, 0, -2, 0, -3, -4, + -4, 0, 0, -5, 0, 0, 0, 0, + 0, 0, -1, 0, 0, 0, 0, 1, + -1, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, + -2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -3, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, 0, 0, 0, + -3, 0, 0, 0, 0, -8, -5, 0, + 0, 0, -2, -8, 0, 0, -2, 2, + 0, -4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -3, 0, 0, -3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, -3, 0, + 0, 0, 0, 2, 0, 1, -3, -3, + 0, -2, -2, -2, 0, 0, 0, 0, + 0, 0, -5, 0, -2, 0, -2, -2, + 0, -4, -4, -5, -1, 0, -3, 0, + -5, 0, 0, 0, 0, 13, 0, 0, + 1, 0, 0, -2, 0, 2, 0, -7, + 0, 0, 0, 0, 0, -15, -3, 5, + 5, -1, -7, 0, 2, -2, 0, -8, + -1, -2, 2, -11, -2, 2, 0, 2, + -6, -2, -6, -5, -7, 0, 0, -10, + 0, 9, 0, 0, -1, 0, 0, 0, + -1, -1, -2, -4, -5, 0, -15, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 0, -1, -2, -2, 0, 0, + -3, 0, -2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -3, 0, 0, 3, + 0, 2, 0, -4, 2, -1, 0, -4, + -2, 0, -2, -2, -1, 0, -2, -3, + 0, 0, -1, 0, -1, -3, -2, 0, + 0, -2, 0, 2, -1, 0, -4, 0, + 0, 0, -3, 0, -3, 0, -3, -3, + 2, 0, 0, 0, 0, 0, 0, 0, + 0, -3, 2, 0, -2, 0, -1, -2, + -5, -1, -1, -1, 0, -1, -2, 0, + 0, 0, 0, 0, 0, -2, -1, -1, + 0, 0, 0, 0, 2, -1, 0, -1, + 0, 0, 0, -1, -2, -1, -1, -2, + -1, 0, 1, 6, 0, 0, -4, 0, + -1, 3, 0, -2, -7, -2, 2, 0, + 0, -8, -3, 2, -3, 1, 0, -1, + -1, -5, 0, -2, 1, 0, 0, -3, + 0, 0, 0, 2, 2, -3, -3, 0, + -3, -2, -2, -2, -2, 0, -3, 1, + -3, -3, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, -2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, 0, 0, -2, + 0, 0, -2, -2, 0, 0, 0, 0, + -2, 0, 0, 0, 0, -1, 0, 0, + 0, 0, 0, -1, 0, 0, 0, 0, + -2, 0, -3, 0, 0, 0, -5, 0, + 1, -4, 3, 0, -1, -8, 0, 0, + -4, -2, 0, -6, -4, -4, 0, 0, + -7, -2, -6, -6, -8, 0, -4, 0, + 1, 11, -2, 0, -4, -2, 0, -2, + -3, -4, -3, -6, -7, -4, -2, 0, + 0, -1, 0, 0, 0, 0, -11, -1, + 5, 4, -4, -6, 0, 0, -5, 0, + -8, -1, -2, 3, -15, -2, 0, 0, + 0, -10, -2, -8, -2, -12, 0, 0, + -11, 0, 9, 0, 0, -1, 0, 0, + 0, 0, -1, -1, -6, -1, 0, -10, + 0, 0, 0, 0, -5, 0, -1, 0, + 0, -4, -8, 0, 0, -1, -2, -5, + -2, 0, -1, 0, 0, 0, 0, -7, + -2, -5, -5, -1, -3, -4, -2, -3, + 0, -3, -1, -5, -2, 0, -2, -3, + -2, -3, 0, 1, 0, -1, -5, 0, + 3, 0, -3, 0, 0, 0, 0, 2, + 0, 1, -3, 7, 0, -2, -2, -2, + 0, 0, 0, 0, 0, 0, -5, 0, + -2, 0, -2, -2, 0, -4, -4, -5, + -1, 0, -3, 1, 6, 0, 0, 0, + 0, 13, 0, 0, 1, 0, 0, -2, + 0, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -1, -3, 0, 0, 0, 0, 0, -1, + 0, 0, 0, -2, -2, 0, 0, -3, + -2, 0, 0, -3, 0, 3, -1, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 2, 3, 1, -1, 0, -5, + -3, 0, 5, -5, -5, -3, -3, 6, + 3, 2, -14, -1, 3, -2, 0, -2, + 2, -2, -6, 0, -2, 2, -2, -1, + -5, -1, 0, 0, 5, 3, 0, -4, + 0, -9, -2, 5, -2, -6, 0, -2, + -5, -5, -2, 6, 2, 0, -2, 0, + -4, 0, 1, 5, -4, -6, -6, -4, + 5, 0, 0, -12, -1, 2, -3, -1, + -4, 0, -4, -6, -2, -2, -1, 0, + 0, -4, -3, -2, 0, 5, 4, -2, + -9, 0, -9, -2, 0, -6, -9, 0, + -5, -3, -5, -4, 4, 0, 0, -2, + 0, -3, -1, 0, -2, -3, 0, 3, + -5, 2, 0, 0, -8, 0, -2, -4, + -3, -1, -5, -4, -5, -4, 0, -5, + -2, -4, -3, -5, -2, 0, 0, 0, + 8, -3, 0, -5, -2, 0, -2, -3, + -4, -4, -4, -6, -2, -3, 3, 0, + -2, 0, -8, -2, 1, 3, -5, -6, + -3, -5, 5, -2, 1, -15, -3, 3, + -4, -3, -6, 0, -5, -7, -2, -2, + -1, -2, -3, -5, 0, 0, 0, 5, + 4, -1, -10, 0, -10, -4, 4, -6, + -11, -3, -6, -7, -8, -5, 3, 0, + 0, 0, 0, -2, 0, 0, 2, -2, + 3, 1, -3, 3, 0, 0, -5, 0, + 0, 0, 0, 0, 0, -1, 0, 0, + 0, 0, 0, 0, -2, 0, 0, 0, + 0, 1, 5, 0, 0, -2, 0, 0, + 0, 0, -1, -1, -2, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 1, 0, + -1, 0, 6, 0, 3, 0, 0, -2, + 0, 3, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -10, 0, -2, 3, 0, 5, + 0, 0, 16, 2, -3, -3, 2, 2, + -1, 0, -8, 0, 0, 8, -10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -11, 6, 22, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -10, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -3, 0, 0, -3, + -1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, 0, -4, 0, + 0, 0, 0, 0, 2, 21, -3, -1, + 5, 4, -4, 2, 0, 0, 2, 2, + -2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -21, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -4, + 0, 0, 0, -4, 0, 0, 0, 0, + -4, -1, 0, 0, 0, -4, 0, -2, + 0, -8, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 0, 0, -3, 0, -2, 0, + -4, 0, 0, 0, -3, 2, -2, 0, + 0, -4, -2, -4, 0, 0, -4, 0, + -2, 0, -8, 0, -2, 0, 0, -13, + -3, -6, -2, -6, 0, 0, -11, 0, + -4, -1, 0, 0, 0, 0, 0, 0, + 0, 0, -2, -3, -1, -3, 0, 0, + 0, 0, -4, 0, -4, 2, -2, 3, + 0, -1, -4, -1, -3, -3, 0, -2, + -1, -1, 1, -4, 0, 0, 0, 0, + -14, -1, -2, 0, -4, 0, -1, -8, + -1, 0, 0, -1, -1, 0, 0, 0, + 0, 1, 0, -1, -3, -1, 3, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, + 0, -4, 0, -1, 0, 0, 0, -3, + 2, 0, 0, 0, -4, -2, -3, 0, + 0, -4, 0, -2, 0, -8, 0, 0, + 0, 0, -16, 0, -3, -6, -8, 0, + 0, -11, 0, -1, -2, 0, 0, 0, + 0, 0, 0, 0, 0, -2, -2, -1, + -2, 0, 0, 0, 3, -2, 0, 5, + 8, -2, -2, -5, 2, 8, 3, 4, + -4, 2, 7, 2, 5, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 8, -3, -2, 0, -1, + 13, 7, 13, 0, 0, 0, 2, 0, + 0, 6, 0, 0, -3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, -13, -2, -1, -7, + -8, 0, 0, -11, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, -13, -2, -1, + -7, -8, 0, 0, -6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -1, 0, 0, 0, -4, 2, 0, -2, + 1, 3, 2, -5, 0, 0, -1, 2, + 0, 1, 0, 0, 0, 0, -4, 0, + -1, -1, -3, 0, -1, -6, 0, 10, + -2, 0, -4, -1, 0, -1, -3, 0, + -2, -4, -3, -2, 0, 0, 0, -3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, -13, + -2, -1, -7, -8, 0, 0, -11, 0, + 0, 0, 0, 0, 0, 8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -3, 0, -5, -2, -1, 5, -1, -2, + -6, 0, -1, 0, -1, -4, 0, 4, + 0, 1, 0, 1, -4, -6, -2, 0, + -6, -3, -4, -7, -6, 0, -3, -3, + -2, -2, -1, -1, -2, -1, 0, -1, + 0, 2, 0, 2, -1, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -1, -2, -2, 0, 0, + -4, 0, -1, 0, -3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, -2, 0, -2, + 0, 0, 0, 0, -1, 0, 0, -3, + -2, 2, 0, -3, -3, -1, 0, -5, + -1, -4, -1, -2, 0, -3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -11, 0, 5, 0, 0, -3, 0, + 0, 0, 0, -2, 0, -2, 0, 0, + -1, 0, 0, -1, 0, -4, 0, 0, + 7, -2, -5, -5, 1, 2, 2, 0, + -4, 1, 2, 1, 5, 1, 5, -1, + -4, 0, 0, -6, 0, 0, -5, -4, + 0, 0, -3, 0, -2, -3, 0, -2, + 0, -2, 0, -1, 2, 0, -1, -5, + -2, 6, 0, 0, -1, 0, -3, 0, + 0, 2, -4, 0, 2, -2, 1, 0, + 0, -5, 0, -1, 0, 0, -2, 2, + -1, 0, 0, 0, -7, -2, -4, 0, + -5, 0, 0, -8, 0, 6, -2, 0, + -3, 0, 1, 0, -2, 0, -2, -5, + 0, -2, 2, 0, 0, 0, 0, -1, + 0, 0, 2, -2, 0, 0, 0, -2, + -1, 0, -2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -10, 0, 4, 0, + 0, -1, 0, 0, 0, 0, 0, 0, + -2, -2, 0, 0, 0, 3, 0, 4, + 0, 0, 0, 0, 0, -10, -9, 0, + 7, 5, 3, -6, 1, 7, 0, 6, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0 +}; + + +/*Collect the kern class' data in one place*/ +static const lv_font_fmt_txt_kern_classes_t kern_classes = { + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 61, + .right_class_cnt = 49, +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = &kern_classes, + .kern_scale = 16, + .cmap_num = 2, + .bpp = 4, + .kern_classes = 1, + .bitmap_format = 0 +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +lv_font_t lv_font_montserrat_10 = { + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 11, /*The maximum line height required by the font*/ + .base_line = 2, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) + .underline_position = -1, + .underline_thickness = 1, +#endif + .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +}; + + + +#endif /*#if LV_FONT_MONTSERRAT_10*/ + diff --git a/src/lv_font/lv_font_montserrat_8.c b/src/lv_font/lv_font_montserrat_8.c new file mode 100644 index 000000000..ae766a7d2 --- /dev/null +++ b/src/lv_font/lv_font_montserrat_8.c @@ -0,0 +1,1414 @@ +#include "../../lvgl.h" + +/******************************************************************************* + * Size: 8 px + * Bpp: 4 + * Opts: --no-compress --no-prefilter --bpp 4 --size 8 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o lv_font_montserrat_8.c --force-fast-kern-format + ******************************************************************************/ + +#ifndef LV_FONT_MONTSERRAT_8 + #define LV_FONT_MONTSERRAT_8 1 +#endif + +#if LV_FONT_MONTSERRAT_8 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { + /* U+20 " " */ + + /* U+21 "!" */ + 0x58, 0x57, 0x46, 0x23, 0x46, + + /* U+22 "\"" */ + 0x73, 0x97, 0x29, 0x0, 0x0, + + /* U+23 "#" */ + 0x4, 0x52, 0x60, 0x4b, 0x9b, 0xa3, 0x8, 0x7, + 0x20, 0x6c, 0x8c, 0x81, 0x9, 0x9, 0x0, + + /* U+24 "$" */ + 0x0, 0x80, 0x2, 0xbd, 0xa2, 0x76, 0x80, 0x0, + 0x8d, 0x81, 0x0, 0x84, 0x95, 0xad, 0xb3, 0x0, + 0x80, 0x0, + + /* U+25 "%" */ + 0x58, 0x70, 0x63, 0x8, 0x8, 0x36, 0x0, 0x27, + 0x58, 0x67, 0x10, 0x8, 0x27, 0x26, 0x6, 0x20, + 0x88, 0x20, + + /* U+26 "&" */ + 0x9, 0x99, 0x0, 0xb, 0x3a, 0x0, 0x19, 0xc2, + 0x20, 0x83, 0x1a, 0xa0, 0x3a, 0x99, 0x92, 0x0, + 0x0, 0x0, + + /* U+27 "'" */ + 0x72, 0x72, 0x0, + + /* U+28 "(" */ + 0x8, 0x20, 0xb0, 0x1a, 0x3, 0x80, 0x1a, 0x0, + 0xb0, 0x8, 0x20, + + /* U+29 ")" */ + 0x73, 0x19, 0xb, 0xc, 0xb, 0x19, 0x73, + + /* U+2A "*" */ + 0x48, 0x40, 0x6e, 0x80, 0x15, 0x10, + + /* U+2B "+" */ + 0x0, 0x20, 0x0, 0xa, 0x0, 0x49, 0xd9, 0x10, + 0xa, 0x0, + + /* U+2C "," */ + 0x0, 0x75, 0x71, + + /* U+2D "-" */ + 0x5a, 0x60, + + /* U+2E "." */ + 0x0, 0x74, + + /* U+2F "/" */ + 0x0, 0xa, 0x0, 0x2, 0x80, 0x0, 0x82, 0x0, + 0xa, 0x0, 0x4, 0x60, 0x0, 0x91, 0x0, 0x19, + 0x0, 0x0, + + /* U+30 "0" */ + 0xa, 0xbb, 0x26, 0x60, 0x1b, 0x93, 0x0, 0xc6, + 0x60, 0x1b, 0xa, 0xbb, 0x20, + + /* U+31 "1" */ + 0x9e, 0x20, 0xa2, 0xa, 0x20, 0xa2, 0xa, 0x20, + + /* U+32 "2" */ + 0x6a, 0xb9, 0x0, 0x0, 0xc0, 0x0, 0x58, 0x0, + 0x87, 0x0, 0x9e, 0xaa, 0x30, + + /* U+33 "3" */ + 0x7a, 0xbe, 0x0, 0xa, 0x20, 0x4, 0xa9, 0x0, + 0x0, 0xa2, 0x8a, 0xa9, 0x0, + + /* U+34 "4" */ + 0x0, 0x49, 0x0, 0x3, 0xa0, 0x0, 0x1b, 0x8, + 0x20, 0x8b, 0xad, 0xb2, 0x0, 0x9, 0x30, + + /* U+35 "5" */ + 0x3d, 0xaa, 0x5, 0x60, 0x0, 0x5b, 0xa8, 0x0, + 0x0, 0x93, 0x7a, 0xaa, 0x0, + + /* U+36 "6" */ + 0x9, 0xaa, 0x36, 0x70, 0x0, 0x98, 0x9a, 0x26, + 0x80, 0x2a, 0x9, 0x9a, 0x40, + + /* U+37 "7" */ + 0xca, 0xad, 0x67, 0x0, 0xc0, 0x0, 0x67, 0x0, + 0xc, 0x0, 0x6, 0x70, 0x0, + + /* U+38 "8" */ + 0x1a, 0xab, 0x25, 0x60, 0x48, 0x1d, 0xad, 0x38, + 0x40, 0x1b, 0x3a, 0x9a, 0x40, + + /* U+39 "9" */ + 0x4a, 0x99, 0xb, 0x10, 0x95, 0x3a, 0x99, 0x80, + 0x0, 0x95, 0x3a, 0xb8, 0x0, + + /* U+3A ":" */ + 0x74, 0x0, 0x0, 0x74, + + /* U+3B ";" */ + 0x74, 0x0, 0x0, 0x75, 0x62, 0x0, + + /* U+3C "<" */ + 0x0, 0x1, 0x0, 0x49, 0x80, 0x5c, 0x30, 0x0, + 0x16, 0x91, 0x0, 0x0, 0x0, + + /* U+3D "=" */ + 0x49, 0x99, 0x10, 0x0, 0x0, 0x49, 0x99, 0x10, + + /* U+3E ">" */ + 0x10, 0x0, 0x3, 0x98, 0x20, 0x0, 0x6d, 0x14, + 0x94, 0x0, 0x0, 0x0, 0x0, + + /* U+3F "?" */ + 0x6a, 0xb9, 0x0, 0x0, 0xc0, 0x0, 0xa4, 0x0, + 0x3, 0x0, 0x2, 0x80, 0x0, + + /* U+40 "@" */ + 0x3, 0x87, 0x78, 0x50, 0x28, 0x4a, 0x9c, 0x75, + 0x80, 0xb0, 0xa, 0x28, 0x80, 0xb0, 0xa, 0x28, + 0x28, 0x49, 0x99, 0xa6, 0x3, 0x88, 0x75, 0x0, + + /* U+41 "A" */ + 0x0, 0xb, 0x90, 0x0, 0x3, 0x8a, 0x10, 0x0, + 0xb1, 0x39, 0x0, 0x4d, 0x99, 0xd1, 0xb, 0x10, + 0x3, 0x90, + + /* U+42 "B" */ + 0x2d, 0x99, 0xb1, 0x2a, 0x0, 0x84, 0x2d, 0x9a, + 0xd1, 0x2a, 0x0, 0x39, 0x2d, 0x99, 0xb4, + + /* U+43 "C" */ + 0x7, 0xba, 0xa2, 0x59, 0x0, 0x0, 0x93, 0x0, + 0x0, 0x59, 0x0, 0x0, 0x7, 0xba, 0xa2, + + /* U+44 "D" */ + 0x2e, 0xab, 0xb3, 0x2, 0xa0, 0x1, 0xc0, 0x2a, + 0x0, 0x9, 0x22, 0xa0, 0x1, 0xc0, 0x2e, 0xab, + 0xb3, 0x0, + + /* U+45 "E" */ + 0x2e, 0xaa, 0x82, 0xa0, 0x0, 0x2d, 0xaa, 0x42, + 0xa0, 0x0, 0x2e, 0xaa, 0x90, + + /* U+46 "F" */ + 0x2e, 0xaa, 0x82, 0xa0, 0x0, 0x2e, 0xaa, 0x42, + 0xa0, 0x0, 0x2a, 0x0, 0x0, + + /* U+47 "G" */ + 0x7, 0xba, 0xa2, 0x59, 0x0, 0x0, 0x93, 0x0, + 0x23, 0x59, 0x0, 0x47, 0x7, 0xba, 0xa3, + + /* U+48 "H" */ + 0x2a, 0x0, 0x2a, 0x2a, 0x0, 0x2a, 0x2e, 0xaa, + 0xba, 0x2a, 0x0, 0x2a, 0x2a, 0x0, 0x2a, + + /* U+49 "I" */ + 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, + + /* U+4A "J" */ + 0x5, 0xad, 0x50, 0x0, 0x75, 0x0, 0x7, 0x50, + 0x0, 0x84, 0x9, 0xab, 0x0, + + /* U+4B "K" */ + 0x2a, 0x1, 0xa2, 0x2a, 0x1b, 0x20, 0x2c, 0xc7, + 0x0, 0x2d, 0x19, 0x50, 0x2a, 0x0, 0xa4, + + /* U+4C "L" */ + 0x2a, 0x0, 0x2, 0xa0, 0x0, 0x2a, 0x0, 0x2, + 0xa0, 0x0, 0x2e, 0xaa, 0x70, + + /* U+4D "M" */ + 0x2c, 0x0, 0x3, 0xc2, 0xd7, 0x0, 0xbc, 0x29, + 0x92, 0x84, 0xc2, 0x91, 0xb9, 0xc, 0x29, 0x3, + 0x0, 0xc0, + + /* U+4E "N" */ + 0x2d, 0x10, 0x2a, 0x2c, 0xb0, 0x2a, 0x2a, 0x4b, + 0x2a, 0x2a, 0x5, 0xca, 0x2a, 0x0, 0x7a, + + /* U+4F "O" */ + 0x7, 0xbb, 0xb3, 0x5, 0x90, 0x1, 0xc1, 0x93, + 0x0, 0x8, 0x45, 0x90, 0x1, 0xc1, 0x7, 0xbb, + 0xb3, 0x0, + + /* U+50 "P" */ + 0x2e, 0xaa, 0x90, 0x2a, 0x0, 0x84, 0x2a, 0x0, + 0xa3, 0x2e, 0xaa, 0x60, 0x2a, 0x0, 0x0, + + /* U+51 "Q" */ + 0x7, 0xbb, 0xb3, 0x5, 0x90, 0x1, 0xc1, 0x93, + 0x0, 0x8, 0x45, 0x90, 0x0, 0xc1, 0x7, 0xbb, + 0xb3, 0x0, 0x0, 0x39, 0x93, + + /* U+52 "R" */ + 0x2e, 0xaa, 0x90, 0x2a, 0x0, 0x84, 0x2a, 0x0, + 0xa3, 0x2d, 0xac, 0x80, 0x2a, 0x1, 0xa1, + + /* U+53 "S" */ + 0x2a, 0xaa, 0x27, 0x60, 0x0, 0x8, 0x98, 0x10, + 0x0, 0x49, 0x5a, 0xaa, 0x30, + + /* U+54 "T" */ + 0xaa, 0xea, 0x60, 0xc, 0x0, 0x0, 0xc0, 0x0, + 0xc, 0x0, 0x0, 0xc0, 0x0, + + /* U+55 "U" */ + 0x39, 0x0, 0x48, 0x39, 0x0, 0x48, 0x39, 0x0, + 0x48, 0x1c, 0x0, 0x66, 0x6, 0xba, 0xa0, + + /* U+56 "V" */ + 0xb, 0x10, 0x5, 0x70, 0x49, 0x0, 0xb0, 0x0, + 0xc1, 0x57, 0x0, 0x4, 0x9c, 0x0, 0x0, 0xc, + 0x70, 0x0, + + /* U+57 "W" */ + 0x94, 0x0, 0xf1, 0x3, 0x93, 0xa0, 0x69, 0x70, + 0x93, 0xc, 0xb, 0xb, 0xb, 0x0, 0x79, 0x80, + 0x89, 0x70, 0x1, 0xf2, 0x2, 0xf1, 0x0, + + /* U+58 "X" */ + 0x58, 0x2, 0xa0, 0x8, 0x7b, 0x10, 0x0, 0xf5, + 0x0, 0xa, 0x4b, 0x10, 0x76, 0x2, 0xb0, + + /* U+59 "Y" */ + 0xa, 0x20, 0xb, 0x0, 0x1b, 0x9, 0x30, 0x0, + 0x5b, 0x80, 0x0, 0x0, 0xd0, 0x0, 0x0, 0xc, + 0x0, 0x0, + + /* U+5A "Z" */ + 0x6a, 0xac, 0xd0, 0x0, 0x1b, 0x10, 0x0, 0xb2, + 0x0, 0xb, 0x30, 0x0, 0x8d, 0xaa, 0xa0, + + /* U+5B "[" */ + 0x2d, 0x42, 0x90, 0x29, 0x2, 0x90, 0x29, 0x2, + 0x90, 0x2d, 0x40, + + /* U+5C "\\" */ + 0x19, 0x0, 0x0, 0xa0, 0x0, 0x5, 0x50, 0x0, + 0xa, 0x0, 0x0, 0x91, 0x0, 0x3, 0x70, 0x0, + 0xa, 0x0, + + /* U+5D "]" */ + 0x8c, 0xc, 0xc, 0xc, 0xc, 0xc, 0x8c, + + /* U+5E "^" */ + 0x3, 0xc0, 0x0, 0x94, 0x50, 0x27, 0x9, 0x0, + + /* U+5F "_" */ + 0x77, 0x77, + + /* U+60 "`" */ + 0x6, 0x60, + + /* U+61 "a" */ + 0x29, 0x98, 0x2, 0x98, 0xd0, 0x84, 0xc, 0x13, + 0xb9, 0xd1, + + /* U+62 "b" */ + 0x48, 0x0, 0x0, 0x48, 0x0, 0x0, 0x4c, 0xab, + 0x50, 0x4a, 0x0, 0xc0, 0x4a, 0x0, 0xc0, 0x4c, + 0xaa, 0x50, + + /* U+63 "c" */ + 0x1a, 0xaa, 0x18, 0x40, 0x0, 0x84, 0x0, 0x1, + 0xaa, 0xa1, + + /* U+64 "d" */ + 0x0, 0x0, 0xb0, 0x0, 0xb, 0x1a, 0xaa, 0xb9, + 0x40, 0x3b, 0x94, 0x2, 0xb1, 0xa9, 0x9b, + + /* U+65 "e" */ + 0x19, 0x99, 0x19, 0x98, 0x86, 0x85, 0x1, 0x1, + 0xaa, 0xb1, + + /* U+66 "f" */ + 0xa, 0xa0, 0x2a, 0x0, 0x9d, 0x70, 0x29, 0x0, + 0x29, 0x0, 0x29, 0x0, + + /* U+67 "g" */ + 0x1a, 0x99, 0xb9, 0x40, 0x1c, 0x94, 0x2, 0xc1, + 0xaa, 0xab, 0x18, 0x9a, 0x30, + + /* U+68 "h" */ + 0x48, 0x0, 0x4, 0x80, 0x0, 0x4c, 0x9b, 0x44, + 0x90, 0x1b, 0x48, 0x0, 0xc4, 0x80, 0xc, + + /* U+69 "i" */ + 0x37, 0x0, 0x48, 0x48, 0x48, 0x48, + + /* U+6A "j" */ + 0x3, 0x70, 0x0, 0x3, 0x80, 0x38, 0x3, 0x80, + 0x38, 0x6b, 0x40, + + /* U+6B "k" */ + 0x48, 0x0, 0x4, 0x80, 0x0, 0x48, 0xa, 0x44, + 0x9c, 0x30, 0x4d, 0x6a, 0x4, 0x80, 0x77, + + /* U+6C "l" */ + 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, + + /* U+6D "m" */ + 0x4c, 0x9b, 0x89, 0xb4, 0x49, 0x3, 0xb0, 0xb, + 0x48, 0x2, 0xa0, 0xc, 0x48, 0x2, 0xa0, 0xc, + + /* U+6E "n" */ + 0x4c, 0x9b, 0x44, 0x90, 0x1b, 0x48, 0x0, 0xc4, + 0x80, 0xc, + + /* U+6F "o" */ + 0x1a, 0xaa, 0x18, 0x40, 0x3a, 0x84, 0x3, 0xa1, + 0xaa, 0xa1, + + /* U+70 "p" */ + 0x4c, 0xab, 0x50, 0x4a, 0x0, 0xc0, 0x4a, 0x0, + 0xc0, 0x4c, 0xaa, 0x50, 0x48, 0x0, 0x0, + + /* U+71 "q" */ + 0x1a, 0xa9, 0xb9, 0x40, 0x3b, 0x94, 0x3, 0xb1, + 0xaa, 0x9b, 0x0, 0x0, 0xb0, + + /* U+72 "r" */ + 0x4b, 0xa0, 0x4a, 0x0, 0x48, 0x0, 0x48, 0x0, + + /* U+73 "s" */ + 0x5b, 0x95, 0x87, 0x30, 0x3, 0x79, 0x7a, 0xa6, + + /* U+74 "t" */ + 0x29, 0x0, 0x9d, 0x70, 0x29, 0x0, 0x29, 0x0, + 0xb, 0x90, + + /* U+75 "u" */ + 0x57, 0x1, 0xb5, 0x70, 0x1b, 0x48, 0x3, 0xb0, + 0xa9, 0x9b, + + /* U+76 "v" */ + 0xb, 0x0, 0x84, 0x5, 0x70, 0xb0, 0x0, 0xb7, + 0x50, 0x0, 0x6d, 0x0, + + /* U+77 "w" */ + 0xb0, 0xe, 0x20, 0xa0, 0x55, 0x59, 0x82, 0x80, + 0xa, 0xa0, 0xa8, 0x20, 0x9, 0x80, 0x6b, 0x0, + + /* U+78 "x" */ + 0x67, 0x1b, 0x0, 0x9b, 0x10, 0xa, 0xb2, 0x7, + 0x51, 0xb0, + + /* U+79 "y" */ + 0xb, 0x10, 0x83, 0x3, 0x81, 0xa0, 0x0, 0xaa, + 0x30, 0x0, 0x4a, 0x0, 0xa, 0xb2, 0x0, + + /* U+7A "z" */ + 0x59, 0xbb, 0x1, 0xb1, 0xb, 0x20, 0x9c, 0x98, + + /* U+7B "{" */ + 0xa, 0x60, 0xc0, 0xc, 0x5, 0xb0, 0xc, 0x0, + 0xc0, 0xa, 0x60, + + /* U+7C "|" */ + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, + + /* U+7D "}" */ + 0x97, 0x0, 0xb0, 0xb, 0x0, 0xd3, 0xb, 0x0, + 0xb0, 0x97, 0x0, + + /* U+7E "~" */ + 0x29, 0x35, 0x15, 0x6, 0x80, + + /* U+B0 "Ā°" */ + 0x26, 0x47, 0x7, 0x27, 0x50, + + /* U+2022 "ā€¢" */ + 0x0, 0x5d, 0x2, + + /* U+F001 "ļ€" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x26, 0xbe, + 0x0, 0x8d, 0xff, 0xff, 0x0, 0xff, 0xe9, 0x5f, + 0x0, 0xf3, 0x0, 0xf, 0x0, 0xf0, 0x0, 0xf, + 0x0, 0xf0, 0xa, 0xff, 0xaf, 0xf0, 0xa, 0xfa, + 0xaf, 0xa0, 0x0, 0x0, + + /* U+F008 "ļ€ˆ" */ + 0xbd, 0xcc, 0xce, 0xab, 0x8b, 0x0, 0x7, 0x58, + 0xcd, 0x66, 0x6a, 0xac, 0xcd, 0x66, 0x6a, 0xac, + 0x8b, 0x0, 0x7, 0x58, 0xbd, 0xcc, 0xce, 0xab, + + /* U+F00B "ļ€‹" */ + 0x34, 0x14, 0x44, 0x43, 0xff, 0x7f, 0xff, 0xff, + 0xab, 0x4b, 0xbb, 0xba, 0xbc, 0x5c, 0xcc, 0xcb, + 0xff, 0x7f, 0xff, 0xff, 0x67, 0x17, 0x88, 0x86, + 0xff, 0x7f, 0xff, 0xff, 0xab, 0x4b, 0xbb, 0xba, + + /* U+F00C "ļ€Œ" */ + 0x0, 0x0, 0x0, 0x9a, 0x0, 0x0, 0x9, 0xfa, + 0xa9, 0x0, 0x9f, 0xa0, 0xaf, 0x99, 0xfa, 0x0, + 0xa, 0xff, 0xa0, 0x0, 0x0, 0x99, 0x0, 0x0, + + /* U+F00D "ļ€" */ + 0x63, 0x0, 0x82, 0xcf, 0x4a, 0xf4, 0x1d, 0xff, + 0x60, 0xa, 0xff, 0x30, 0xaf, 0x7d, 0xf3, 0xa6, + 0x1, 0xb3, + + /* U+F011 "ļ€‘" */ + 0x0, 0xc, 0x51, 0x0, 0x1d, 0x7d, 0x6e, 0x70, + 0x8d, 0xd, 0x65, 0xf1, 0xc7, 0xd, 0x60, 0xe6, + 0xd7, 0x6, 0x20, 0xe6, 0x9d, 0x0, 0x4, 0xf2, + 0x1e, 0xc7, 0x8f, 0x80, 0x1, 0x9d, 0xc6, 0x0, + + /* U+F013 "ļ€“" */ + 0x0, 0xc, 0xc0, 0x0, 0x18, 0x8f, 0xf8, 0x81, + 0x8f, 0xfe, 0xef, 0xf8, 0x2f, 0xe0, 0xe, 0xf2, + 0x2f, 0xe0, 0xe, 0xf2, 0x8f, 0xfe, 0xef, 0xf8, + 0x18, 0x8f, 0xf8, 0x81, 0x0, 0xc, 0xc0, 0x0, + + /* U+F015 "ļ€•" */ + 0x0, 0x0, 0x30, 0x22, 0x0, 0x0, 0xaf, 0xaa, + 0xa0, 0x1, 0xda, 0x6a, 0xfa, 0x3, 0xe8, 0xbf, + 0xb8, 0xe3, 0xb6, 0xdf, 0xff, 0xd6, 0xb0, 0x8f, + 0xfb, 0xff, 0x80, 0x8, 0xfc, 0xc, 0xf8, 0x0, + 0x5b, 0x80, 0x8b, 0x50, + + /* U+F019 "ļ€™" */ + 0x0, 0xf, 0xf0, 0x0, 0x0, 0xf, 0xf0, 0x0, + 0x0, 0xf, 0xf0, 0x0, 0x7, 0xff, 0xff, 0x70, + 0x0, 0x9f, 0xf9, 0x0, 0x78, 0x7a, 0xa7, 0x87, + 0xff, 0xfb, 0xbf, 0xff, 0xff, 0xff, 0xfb, 0xbf, + + /* U+F01C "ļ€œ" */ + 0x5, 0xff, 0xff, 0xf5, 0x1, 0xe3, 0x0, 0x3, + 0xe1, 0xa8, 0x0, 0x0, 0x8, 0xaf, 0xff, 0x60, + 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, + 0xff, 0xff, 0xfd, + + /* U+F021 "ļ€”" */ + 0x0, 0x0, 0x0, 0x3, 0x2, 0xbf, 0xfb, 0x3f, + 0x2e, 0x91, 0x18, 0xff, 0x9a, 0x0, 0x6c, 0xff, + 0x31, 0x0, 0x24, 0x44, 0x44, 0x42, 0x0, 0x13, + 0xff, 0xc6, 0x0, 0xb9, 0xfe, 0xa5, 0x5b, 0xd1, + 0xf2, 0x8c, 0xc8, 0x10, 0x30, 0x0, 0x0, 0x0, + + /* U+F026 "ļ€¦" */ + 0x0, 0x9, 0x34, 0xcf, 0xff, 0xff, 0xff, 0xff, + 0xab, 0xff, 0x0, 0x4f, 0x0, 0x1, + + /* U+F027 "ļ€§" */ + 0x0, 0x9, 0x0, 0x34, 0xcf, 0x1, 0xff, 0xff, + 0x1b, 0xff, 0xff, 0x1b, 0xbb, 0xff, 0x1, 0x0, + 0x4f, 0x0, 0x0, 0x1, 0x0, + + /* U+F028 "ļ€Ø" */ + 0x0, 0x0, 0x0, 0x54, 0x0, 0x0, 0x90, 0x23, + 0xb3, 0x34, 0xcf, 0x2, 0xc3, 0xbf, 0xff, 0xf1, + 0xb5, 0x6c, 0xff, 0xff, 0x1b, 0x56, 0xca, 0xbf, + 0xf0, 0x2c, 0x3a, 0x0, 0x4f, 0x2, 0x3b, 0x30, + 0x0, 0x10, 0x5, 0x40, + + /* U+F03E "ļ€¾" */ + 0xdf, 0xff, 0xff, 0xfd, 0xf0, 0x7f, 0xff, 0xff, + 0xf8, 0xcf, 0xb1, 0xbf, 0xfb, 0x5b, 0x0, 0xf, + 0xf0, 0x0, 0x0, 0xf, 0xdf, 0xff, 0xff, 0xfd, + + /* U+F048 "ļˆ" */ + 0x40, 0x0, 0x2f, 0x20, 0x8f, 0xf2, 0x9f, 0xff, + 0xcf, 0xff, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xf2, + 0x2e, 0xfb, 0x10, 0x19, + + /* U+F04B "ļ‹" */ + 0x0, 0x0, 0x0, 0xd, 0xa1, 0x0, 0x0, 0xff, + 0xf7, 0x0, 0xf, 0xff, 0xfd, 0x40, 0xff, 0xff, + 0xff, 0xaf, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xd4, + 0xf, 0xff, 0x70, 0x0, 0xda, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x0, + + /* U+F04C "ļŒ" */ + 0x9b, 0x90, 0x9b, 0x9f, 0xff, 0xf, 0xff, 0xff, + 0xf0, 0xff, 0xff, 0xff, 0xf, 0xff, 0xff, 0xf0, + 0xff, 0xff, 0xff, 0xf, 0xff, 0xff, 0xf0, 0xff, + 0xf2, 0x42, 0x2, 0x42, + + /* U+F04D "ļ" */ + 0x24, 0x44, 0x44, 0x2f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf8, 0xbb, 0xbb, 0xb8, + + /* U+F051 "ļ‘" */ + 0x20, 0x0, 0x4f, 0x80, 0x2f, 0xff, 0x92, 0xff, + 0xff, 0xcf, 0xff, 0xff, 0xff, 0xfe, 0x5f, 0xfd, + 0x22, 0xf9, 0x10, 0x1b, + + /* U+F052 "ļ’" */ + 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x8f, 0x80, + 0x0, 0x0, 0x7f, 0xff, 0x70, 0x0, 0x5f, 0xff, + 0xff, 0x50, 0xe, 0xff, 0xff, 0xfe, 0x0, 0x58, + 0x88, 0x88, 0x50, 0xf, 0xff, 0xff, 0xff, 0x0, + 0xab, 0xbb, 0xbb, 0xa0, + + /* U+F053 "ļ“" */ + 0x0, 0x6, 0x20, 0x7, 0xf4, 0x7, 0xf5, 0x5, + 0xf6, 0x0, 0x1e, 0xb0, 0x0, 0x2e, 0xb0, 0x0, + 0x2e, 0x60, 0x0, 0x10, + + /* U+F054 "ļ”" */ + 0x26, 0x0, 0x4, 0xf7, 0x0, 0x5, 0xf7, 0x0, + 0x6, 0xf5, 0x0, 0xbe, 0x10, 0xbe, 0x20, 0x6e, + 0x20, 0x0, 0x10, 0x0, + + /* U+F067 "ļ§" */ + 0x0, 0x4, 0x0, 0x0, 0x3, 0xf3, 0x0, 0x0, + 0x4f, 0x40, 0x7, 0x8a, 0xfa, 0x87, 0xef, 0xff, + 0xff, 0xe0, 0x4, 0xf4, 0x0, 0x0, 0x4f, 0x40, + 0x0, 0x1, 0xb1, 0x0, + + /* U+F068 "ļØ" */ + 0x78, 0x88, 0x88, 0x7e, 0xff, 0xff, 0xfe, + + /* U+F06E "ļ®" */ + 0x0, 0x8c, 0xcc, 0x80, 0x1, 0xdd, 0x16, 0x3d, + 0xd1, 0xcf, 0x55, 0xed, 0x5f, 0xcb, 0xf5, 0xdf, + 0xd5, 0xfc, 0x1d, 0xd3, 0x73, 0xdd, 0x10, 0x8, + 0xdc, 0xc8, 0x10, + + /* U+F070 "ļ°" */ + 0x1d, 0x30, 0x0, 0x0, 0x0, 0x0, 0x5e, 0x8c, + 0xcc, 0xa2, 0x0, 0x0, 0x2d, 0xb4, 0x49, 0xf4, + 0x0, 0x7a, 0x1a, 0xff, 0x3f, 0xe1, 0x7, 0xfa, + 0x6, 0xf7, 0xff, 0x10, 0xa, 0xf3, 0x3, 0xef, + 0x40, 0x0, 0x6, 0xcc, 0x71, 0xbb, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x89, + + /* U+F071 "ļ±" */ + 0x0, 0x0, 0x3e, 0x30, 0x0, 0x0, 0x0, 0xc, + 0xfc, 0x0, 0x0, 0x0, 0x6, 0xfc, 0xf6, 0x0, + 0x0, 0x0, 0xed, 0xd, 0xe0, 0x0, 0x0, 0x8f, + 0xe0, 0xef, 0x80, 0x0, 0x2f, 0xff, 0x6f, 0xff, + 0x20, 0xb, 0xff, 0xe2, 0xef, 0xfa, 0x0, 0xdf, + 0xff, 0xff, 0xff, 0xd0, + + /* U+F074 "ļ“" */ + 0x0, 0x0, 0x0, 0x20, 0x44, 0x0, 0x4, 0xf5, + 0xef, 0xb1, 0xcf, 0xfd, 0x1, 0x8c, 0xd1, 0xc1, + 0x1, 0xdc, 0x81, 0xc1, 0xef, 0xc1, 0xbf, 0xfd, + 0x44, 0x0, 0x4, 0xf5, 0x0, 0x0, 0x0, 0x20, + + /* U+F077 "ļ·" */ + 0x0, 0x0, 0x0, 0x0, 0x4, 0xe4, 0x0, 0x4, + 0xfc, 0xf4, 0x4, 0xf8, 0x8, 0xf4, 0xb8, 0x0, + 0x8, 0xb0, 0x0, 0x0, 0x0, + + /* U+F078 "ļø" */ + 0x0, 0x0, 0x0, 0xb, 0x80, 0x0, 0x8b, 0x4f, + 0x80, 0x8f, 0x40, 0x4f, 0xcf, 0x40, 0x0, 0x4e, + 0x40, 0x0, 0x0, 0x0, 0x0, + + /* U+F079 "ļ¹" */ + 0x0, 0x94, 0x14, 0x44, 0x40, 0x0, 0xbf, 0xf8, + 0xbb, 0xbf, 0x10, 0x8, 0xb7, 0x60, 0x0, 0xe1, + 0x0, 0xb, 0x40, 0x0, 0x1e, 0x20, 0x0, 0xb7, + 0x44, 0x5e, 0xfd, 0x50, 0x7, 0xbb, 0xb8, 0x5f, + 0x80, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, + + /* U+F07B "ļ»" */ + 0xdf, 0xfb, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfd, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xfd, + + /* U+F093 "ļ‚“" */ + 0x0, 0x9, 0x90, 0x0, 0x0, 0x9f, 0xf9, 0x0, + 0x7, 0xff, 0xff, 0x70, 0x0, 0xf, 0xf0, 0x0, + 0x0, 0xf, 0xf0, 0x0, 0x78, 0x4f, 0xf4, 0x87, + 0xff, 0xe8, 0x8e, 0xff, 0xff, 0xff, 0xfb, 0xbf, + + /* U+F095 "ļ‚•" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, + 0xea, 0x0, 0x0, 0x0, 0xef, 0xe0, 0x0, 0x0, + 0xc, 0xfc, 0x0, 0x0, 0x0, 0x4f, 0x70, 0x0, + 0x0, 0x1d, 0xe0, 0x7, 0xdc, 0x4d, 0xf3, 0x0, + 0xef, 0xff, 0xe3, 0x0, 0xa, 0xec, 0x70, 0x0, + 0x0, + + /* U+F0C4 "ļƒ„" */ + 0x3, 0x0, 0x0, 0x0, 0xcd, 0xc0, 0x2d, 0xc0, + 0xe7, 0xf2, 0xee, 0x20, 0x4b, 0xff, 0xe2, 0x0, + 0x4, 0xff, 0xa0, 0x0, 0xcd, 0xf9, 0xf9, 0x0, + 0xe7, 0xe0, 0x7f, 0x90, 0x4a, 0x40, 0x4, 0x50, + + /* U+F0C5 "ļƒ…" */ + 0x0, 0xff, 0xf7, 0x47, 0x4f, 0xff, 0x47, 0xf8, + 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xf8, 0xff, + 0xff, 0xff, 0x8f, 0xff, 0xff, 0xfb, 0x78, 0x88, + 0x7f, 0xff, 0xff, 0x0, + + /* U+F0C7 "ļƒ‡" */ + 0x24, 0x44, 0x41, 0xf, 0xbb, 0xbb, 0xe2, 0xf0, + 0x0, 0xf, 0xdf, 0x44, 0x44, 0xff, 0xff, 0xfc, + 0xff, 0xff, 0xf9, 0x9, 0xff, 0xff, 0xd5, 0xdf, + 0xf8, 0xbb, 0xbb, 0xb8, + + /* U+F0E7 "ļƒ§" */ + 0x7, 0xff, 0x60, 0x0, 0xaf, 0xf2, 0x0, 0xc, + 0xff, 0x87, 0x0, 0xef, 0xff, 0xb0, 0x7, 0x8e, + 0xf2, 0x0, 0x0, 0xf8, 0x0, 0x0, 0x3e, 0x0, + 0x0, 0x6, 0x50, 0x0, + + /* U+F0EA "ļƒŖ" */ + 0x79, 0xb9, 0x70, 0xf, 0xfc, 0xff, 0x0, 0xff, + 0x68, 0x83, 0xf, 0xf8, 0xff, 0x8b, 0xff, 0x8f, + 0xf8, 0x8f, 0xf8, 0xff, 0xff, 0x78, 0x8f, 0xff, + 0xf0, 0x7, 0xff, 0xff, + + /* U+F0F3 "ļƒ³" */ + 0x0, 0xd, 0x0, 0x0, 0x4e, 0xfe, 0x30, 0xd, + 0xff, 0xfd, 0x0, 0xff, 0xff, 0xf0, 0x3f, 0xff, + 0xff, 0x3b, 0xff, 0xff, 0xfb, 0x78, 0x88, 0x88, + 0x60, 0x4, 0xf4, 0x0, + + /* U+F11C "ļ„œ" */ + 0xdf, 0xff, 0xff, 0xff, 0xdf, 0x18, 0x81, 0x88, + 0x1f, 0xfe, 0xaa, 0xca, 0xae, 0xff, 0xea, 0xac, + 0xaa, 0xef, 0xf1, 0x80, 0x0, 0x81, 0xfd, 0xff, + 0xff, 0xff, 0xfd, + + /* U+F124 "ļ„¤" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x4b, 0xc0, 0x0, 0x0, 0x5c, 0xff, 0xb0, 0x0, + 0x6e, 0xff, 0xff, 0x40, 0xd, 0xff, 0xff, 0xfc, + 0x0, 0x6, 0x88, 0xcf, 0xf5, 0x0, 0x0, 0x0, + 0x8f, 0xe0, 0x0, 0x0, 0x0, 0x8f, 0x60, 0x0, + 0x0, 0x0, 0x5d, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, + + /* U+F15B "ļ…›" */ + 0xff, 0xf8, 0xb0, 0xff, 0xf8, 0xfb, 0xff, 0xfc, + 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + + /* U+F1EB "ļ‡«" */ + 0x0, 0x4, 0x77, 0x40, 0x0, 0x9, 0xff, 0xcc, + 0xff, 0x90, 0xcd, 0x40, 0x0, 0x4, 0xdc, 0x20, + 0x4b, 0xff, 0xb4, 0x2, 0x1, 0xfa, 0x55, 0xaf, + 0x10, 0x0, 0x0, 0x21, 0x0, 0x0, 0x0, 0x0, + 0xee, 0x0, 0x0, 0x0, 0x0, 0x87, 0x0, 0x0, + + /* U+F240 "ļ‰€" */ + 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb, + 0xbb, 0xda, 0xf7, 0xee, 0xee, 0xee, 0x5f, 0xf8, + 0xff, 0xff, 0xff, 0x2f, 0xf5, 0x66, 0x66, 0x66, + 0xab, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3, + + /* U+F241 "ļ‰" */ + 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb, + 0xbb, 0xda, 0xf7, 0xee, 0xee, 0x70, 0x5f, 0xf8, + 0xff, 0xff, 0x80, 0x2f, 0xf5, 0x66, 0x66, 0x54, + 0xab, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3, + + /* U+F242 "ļ‰‚" */ + 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb, + 0xbb, 0xda, 0xf7, 0xee, 0xe0, 0x0, 0x5f, 0xf8, + 0xff, 0xf0, 0x0, 0x2f, 0xf5, 0x66, 0x64, 0x44, + 0xab, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3, + + /* U+F243 "ļ‰ƒ" */ + 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb, + 0xbb, 0xda, 0xf7, 0xe7, 0x0, 0x0, 0x5f, 0xf8, + 0xf8, 0x0, 0x0, 0x2f, 0xf5, 0x65, 0x44, 0x44, + 0xab, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3, + + /* U+F244 "ļ‰„" */ + 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb, + 0xbb, 0xd8, 0xf0, 0x0, 0x0, 0x0, 0x5f, 0xf0, + 0x0, 0x0, 0x0, 0x2f, 0xf4, 0x44, 0x44, 0x44, + 0xad, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3, + + /* U+F287 "ļŠ‡" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, + 0xd8, 0x0, 0x0, 0x0, 0x7, 0x36, 0x40, 0x0, + 0x9, 0xb1, 0x91, 0x11, 0x17, 0x20, 0xef, 0x88, + 0xd8, 0x88, 0xd9, 0x2, 0x20, 0x6, 0x48, 0x70, + 0x0, 0x0, 0x0, 0x6, 0xec, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, + + /* U+F293 "ļŠ“" */ + 0x6, 0xdd, 0xc3, 0x4, 0xff, 0x3e, 0xd0, 0x9c, + 0xb5, 0x5f, 0x2b, 0xf7, 0x1a, 0xf4, 0xbf, 0x81, + 0xbf, 0x39, 0xc9, 0x64, 0xf2, 0x4f, 0xf3, 0xde, + 0x0, 0x6d, 0xed, 0x30, + + /* U+F2ED "ļ‹­" */ + 0x78, 0xdf, 0xd8, 0x77, 0x88, 0x88, 0x87, 0x8f, + 0xff, 0xff, 0x88, 0xcc, 0x8c, 0xc8, 0x8c, 0xc8, + 0xcc, 0x88, 0xcc, 0x8c, 0xc8, 0x8c, 0xc8, 0xcc, + 0x85, 0xff, 0xff, 0xf5, + + /* U+F304 "ļŒ„" */ + 0x0, 0x0, 0x0, 0x7e, 0x30, 0x0, 0x0, 0x4b, + 0xfe, 0x0, 0x0, 0x8f, 0x9b, 0x70, 0x0, 0x8f, + 0xff, 0x40, 0x0, 0x8f, 0xff, 0x80, 0x0, 0x7f, + 0xff, 0x80, 0x0, 0xe, 0xff, 0x80, 0x0, 0x0, + 0xee, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, + + /* U+F55A "ļ•š" */ + 0x0, 0xaf, 0xff, 0xff, 0xfc, 0xb, 0xff, 0x9c, + 0xc9, 0xff, 0xaf, 0xff, 0xc1, 0x1c, 0xff, 0xaf, + 0xff, 0xc1, 0x1c, 0xff, 0xb, 0xff, 0x9c, 0xc9, + 0xff, 0x0, 0xaf, 0xff, 0xff, 0xfc, + + /* U+F7C2 "ļŸ‚" */ + 0x7, 0xff, 0xfe, 0x17, 0xb6, 0x27, 0xc3, 0xfe, + 0xb9, 0xbe, 0x3f, 0xff, 0xff, 0xf3, 0xff, 0xff, + 0xff, 0x3f, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, + 0x3c, 0xff, 0xff, 0xe1, + + /* U+F8A2 "ļ¢¢" */ + 0x0, 0x0, 0x0, 0x3, 0x0, 0x23, 0x0, 0x2, + 0xf0, 0x2e, 0x92, 0x22, 0x5f, 0xd, 0xff, 0xff, + 0xff, 0xf0, 0x2e, 0x92, 0x22, 0x21, 0x0, 0x23, + 0x0, 0x0, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 34, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 34, .box_w = 2, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5, .adv_w = 50, .box_w = 3, .box_h = 3, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 10, .adv_w = 90, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 25, .adv_w = 79, .box_w = 5, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 43, .adv_w = 108, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 61, .adv_w = 88, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 79, .adv_w = 27, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 82, .adv_w = 43, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 93, .adv_w = 43, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 100, .adv_w = 51, .box_w = 4, .box_h = 3, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 106, .adv_w = 74, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 116, .adv_w = 29, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 119, .adv_w = 49, .box_w = 3, .box_h = 1, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 121, .adv_w = 29, .box_w = 2, .box_h = 2, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 123, .adv_w = 45, .box_w = 5, .box_h = 7, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 141, .adv_w = 85, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 154, .adv_w = 47, .box_w = 3, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 162, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 175, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 188, .adv_w = 86, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 203, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 216, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 229, .adv_w = 77, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 242, .adv_w = 82, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 255, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 268, .adv_w = 29, .box_w = 2, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 272, .adv_w = 29, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 278, .adv_w = 74, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 291, .adv_w = 74, .box_w = 5, .box_h = 3, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 299, .adv_w = 74, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 312, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 325, .adv_w = 132, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 349, .adv_w = 94, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 367, .adv_w = 97, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 382, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 397, .adv_w = 106, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 415, .adv_w = 86, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 428, .adv_w = 81, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 441, .adv_w = 99, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 456, .adv_w = 104, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 471, .adv_w = 40, .box_w = 2, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 476, .adv_w = 66, .box_w = 5, .box_h = 5, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 489, .adv_w = 92, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 504, .adv_w = 76, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 517, .adv_w = 122, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 535, .adv_w = 104, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 550, .adv_w = 108, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 568, .adv_w = 92, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 583, .adv_w = 108, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 604, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 619, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 632, .adv_w = 75, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 645, .adv_w = 101, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 660, .adv_w = 91, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 678, .adv_w = 144, .box_w = 9, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 701, .adv_w = 86, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 716, .adv_w = 83, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 734, .adv_w = 84, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 749, .adv_w = 43, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 760, .adv_w = 45, .box_w = 5, .box_h = 7, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 778, .adv_w = 43, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 785, .adv_w = 75, .box_w = 5, .box_h = 3, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 793, .adv_w = 64, .box_w = 4, .box_h = 1, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 795, .adv_w = 77, .box_w = 3, .box_h = 1, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 797, .adv_w = 77, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 807, .adv_w = 87, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 825, .adv_w = 73, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 835, .adv_w = 87, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 850, .adv_w = 78, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 860, .adv_w = 45, .box_w = 4, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 872, .adv_w = 88, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 885, .adv_w = 87, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 900, .adv_w = 36, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 906, .adv_w = 36, .box_w = 3, .box_h = 7, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 917, .adv_w = 79, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 932, .adv_w = 36, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 938, .adv_w = 135, .box_w = 8, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 954, .adv_w = 87, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 964, .adv_w = 81, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 974, .adv_w = 87, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 989, .adv_w = 87, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1002, .adv_w = 52, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1010, .adv_w = 64, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1018, .adv_w = 53, .box_w = 4, .box_h = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1028, .adv_w = 87, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1038, .adv_w = 72, .box_w = 6, .box_h = 4, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 1050, .adv_w = 115, .box_w = 8, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1066, .adv_w = 71, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1076, .adv_w = 72, .box_w = 6, .box_h = 5, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 1091, .adv_w = 67, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1099, .adv_w = 45, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1110, .adv_w = 38, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1117, .adv_w = 45, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1128, .adv_w = 74, .box_w = 5, .box_h = 2, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 1133, .adv_w = 54, .box_w = 3, .box_h = 3, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 1138, .adv_w = 40, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 1141, .adv_w = 128, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1177, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1201, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1233, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1257, .adv_w = 88, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1275, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1307, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1339, .adv_w = 144, .box_w = 9, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1375, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1407, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1434, .adv_w = 128, .box_w = 8, .box_h = 10, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1474, .adv_w = 64, .box_w = 4, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1488, .adv_w = 96, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1509, .adv_w = 144, .box_w = 9, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1545, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1569, .adv_w = 112, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1589, .adv_w = 112, .box_w = 7, .box_h = 10, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1624, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1652, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1680, .adv_w = 112, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1700, .adv_w = 112, .box_w = 9, .box_h = 8, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 1736, .adv_w = 80, .box_w = 5, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1756, .adv_w = 80, .box_w = 5, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1776, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1804, .adv_w = 112, .box_w = 7, .box_h = 2, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 1811, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1838, .adv_w = 160, .box_w = 11, .box_h = 8, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 1882, .adv_w = 144, .box_w = 11, .box_h = 8, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 1926, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1958, .adv_w = 112, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1979, .adv_w = 112, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2000, .adv_w = 160, .box_w = 11, .box_h = 7, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 2039, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2063, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2095, .adv_w = 128, .box_w = 9, .box_h = 9, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 2136, .adv_w = 112, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2168, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2196, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2224, .adv_w = 80, .box_w = 7, .box_h = 8, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 2252, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2280, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2308, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2335, .adv_w = 128, .box_w = 10, .box_h = 10, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 2385, .adv_w = 96, .box_w = 6, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2409, .adv_w = 160, .box_w = 10, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2449, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2479, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2509, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2539, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2569, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2599, .adv_w = 160, .box_w = 11, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2643, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2671, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2699, .adv_w = 128, .box_w = 9, .box_h = 9, .ofs_x = -1, .ofs_y = -2}, + {.bitmap_index = 2740, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2770, .adv_w = 96, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2798, .adv_w = 129, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_1[] = { + 0x0, 0x1f72, 0xef51, 0xef58, 0xef5b, 0xef5c, 0xef5d, 0xef61, + 0xef63, 0xef65, 0xef69, 0xef6c, 0xef71, 0xef76, 0xef77, 0xef78, + 0xef8e, 0xef98, 0xef9b, 0xef9c, 0xef9d, 0xefa1, 0xefa2, 0xefa3, + 0xefa4, 0xefb7, 0xefb8, 0xefbe, 0xefc0, 0xefc1, 0xefc4, 0xefc7, + 0xefc8, 0xefc9, 0xefcb, 0xefe3, 0xefe5, 0xf014, 0xf015, 0xf017, + 0xf037, 0xf03a, 0xf043, 0xf06c, 0xf074, 0xf0ab, 0xf13b, 0xf190, + 0xf191, 0xf192, 0xf193, 0xf194, 0xf1d7, 0xf1e3, 0xf23d, 0xf254, + 0xf4aa, 0xf712, 0xf7f2 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = { + { + .range_start = 32, .range_length = 95, .glyph_id_start = 1, + .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY + }, + { + .range_start = 176, .range_length = 63475, .glyph_id_start = 96, + .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 59, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Map glyph_ids to kern left classes*/ +static const uint8_t kern_left_class_mapping[] = { + 0, 0, 1, 2, 0, 3, 4, 5, + 2, 6, 7, 8, 9, 10, 9, 10, + 11, 12, 0, 13, 14, 15, 16, 17, + 18, 19, 12, 20, 20, 0, 0, 0, + 21, 22, 23, 24, 25, 22, 26, 27, + 28, 29, 29, 30, 31, 32, 29, 29, + 22, 33, 34, 35, 3, 36, 30, 37, + 37, 38, 39, 40, 41, 42, 43, 0, + 44, 0, 45, 46, 47, 48, 49, 50, + 51, 45, 52, 52, 53, 48, 45, 45, + 46, 46, 54, 55, 56, 57, 51, 58, + 58, 59, 58, 60, 41, 0, 0, 9, + 61, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 +}; + +/*Map glyph_ids to kern right classes*/ +static const uint8_t kern_right_class_mapping[] = { + 0, 0, 1, 2, 0, 3, 4, 5, + 2, 6, 7, 8, 9, 10, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 12, + 18, 19, 20, 21, 21, 0, 0, 0, + 22, 23, 24, 25, 23, 25, 25, 25, + 23, 25, 25, 26, 25, 25, 25, 25, + 23, 25, 23, 25, 3, 27, 28, 29, + 29, 30, 31, 32, 33, 34, 35, 0, + 36, 0, 37, 38, 39, 39, 39, 0, + 39, 38, 40, 41, 38, 38, 42, 42, + 39, 42, 39, 42, 43, 44, 45, 46, + 46, 47, 46, 48, 0, 0, 35, 9, + 49, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 +}; + +/*Kern values between classes*/ +static const int8_t kern_class_values[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 0, 3, -3, 0, 0, + 0, 0, -7, -8, 1, 6, 3, 2, + -5, 1, 6, 0, 5, 1, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 8, 1, -1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, -4, 0, 0, 0, 0, + 0, -3, 2, 3, 0, 0, -1, 0, + -1, 1, 0, -1, 0, -1, -1, -3, + 0, 0, 0, 0, -1, 0, 0, -2, + -2, 0, 0, -1, 0, -3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -1, + -1, 0, -2, 0, -3, 0, -15, 0, + 0, -3, 0, 3, 4, 0, 0, -3, + 1, 1, 4, 3, -2, 3, 0, 0, + -7, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -3, -2, -6, 0, -5, + -1, 0, 0, 0, 0, 0, 5, 0, + -4, -1, 0, 0, 0, -2, 0, 0, + -1, -9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -10, -1, 5, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 4, + 0, 1, 0, 0, -3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, + 3, 1, 4, -1, 0, 0, 3, -1, + -4, -18, 1, 3, 3, 0, -2, 0, + 5, 0, 4, 0, 4, 0, -12, 0, + -2, 4, 0, 4, -1, 3, 1, 0, + 0, 0, -1, 0, 0, -2, 10, 0, + 10, 0, 4, 0, 5, 2, 2, 4, + 0, 0, 0, -5, 0, 0, 0, 0, + 0, -1, 0, 1, -2, -2, -3, 1, + 0, -1, 0, 0, 0, -5, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -8, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -7, 0, -8, 0, 0, 0, + 0, -1, 0, 13, -2, -2, 1, 1, + -1, 0, -2, 1, 0, 0, -7, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -12, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -8, 0, 8, 0, 0, -5, 0, + 4, 0, -9, -12, -9, -3, 4, 0, + 0, -9, 0, 2, -3, 0, -2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 4, -16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 0, 1, 0, 0, 0, + 0, 0, 1, 1, -2, -3, 0, 0, + 0, -1, 0, 0, -1, 0, 0, 0, + -3, 0, -1, 0, -3, -3, 0, -3, + -4, -4, -2, 0, -3, 0, -3, 0, + 0, 0, 0, -1, 0, 0, 1, 0, + 1, -1, 0, 0, 0, 0, 0, 1, + -1, 0, 0, 0, -1, 1, 1, 0, + 0, 0, 0, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, -1, 0, + -2, 0, -2, 0, 0, -1, 0, 4, + 0, 0, -1, 0, 0, 0, 0, 0, + 0, 0, -1, -1, 0, 0, -1, 0, + -1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -1, -1, 0, -1, -2, 0, + 0, 0, 0, 0, 0, 0, 0, -1, + 0, -1, -1, -1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -1, 0, 0, + 0, 0, -1, -2, 0, -2, 0, -4, + -1, -4, 3, 0, 0, -3, 1, 3, + 3, 0, -3, 0, -2, 0, 0, -6, + 1, -1, 1, -7, 1, 0, 0, 0, + -7, 0, -7, -1, -11, -1, 0, -6, + 0, 3, 4, 0, 2, 0, 0, 0, + 0, 0, 0, -2, -2, 0, -4, 0, + 0, 0, -1, 0, 0, 0, -1, 0, + 0, 0, 0, 0, -1, -1, 0, -1, + -2, 0, 0, 0, 0, 0, 0, 0, + -1, -1, 0, -1, -2, -1, 0, 0, + -1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, -1, 0, -2, + 0, -1, 0, -3, 1, 0, 0, -2, + 1, 1, 1, 0, 0, 0, 0, 0, + 0, -1, 0, 0, 0, 0, 0, 1, + 0, 0, -1, 0, -1, -1, -2, 0, + 0, 0, 0, 0, 0, 0, 1, 0, + -1, 0, 0, 0, 0, -1, -2, 0, + -2, 0, 4, -1, 0, -4, 0, 0, + 3, -6, -7, -5, -3, 1, 0, -1, + -8, -2, 0, -2, 0, -3, 2, -2, + -8, 0, -3, 0, 0, 1, 0, 1, + -1, 0, 1, 0, -4, -5, 0, -6, + -3, -3, -3, -4, -2, -3, 0, -2, + -3, 1, 0, 0, 0, -1, 0, 0, + 0, 1, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -1, + 0, -1, 0, 0, -1, 0, -2, -3, + -3, 0, 0, -4, 0, 0, 0, 0, + 0, 0, -1, 0, 0, 0, 0, 1, + -1, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, + -1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, 0, 0, 0, + -2, 0, 0, 0, 0, -6, -4, 0, + 0, 0, -2, -6, 0, 0, -1, 1, + 0, -3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, 0, 0, -2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, -2, 0, + 0, 0, 0, 2, 0, 1, -3, -3, + 0, -1, -1, -2, 0, 0, 0, 0, + 0, 0, -4, 0, -1, 0, -2, -1, + 0, -3, -3, -4, -1, 0, -3, 0, + -4, 0, 0, 0, 0, 10, 0, 0, + 1, 0, 0, -2, 0, 1, 0, -6, + 0, 0, 0, 0, 0, -12, -2, 4, + 4, -1, -5, 0, 1, -2, 0, -6, + -1, -2, 1, -9, -1, 2, 0, 2, + -4, -2, -5, -4, -5, 0, 0, -8, + 0, 7, 0, 0, -1, 0, 0, 0, + -1, -1, -1, -3, -4, 0, -12, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -1, 0, -1, -1, -2, 0, 0, + -3, 0, -1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -3, 0, 0, 3, + 0, 2, 0, -3, 1, -1, 0, -3, + -1, 0, -2, -1, -1, 0, -2, -2, + 0, 0, -1, 0, -1, -2, -2, 0, + 0, -1, 0, 1, -1, 0, -3, 0, + 0, 0, -3, 0, -2, 0, -2, -2, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, -3, 1, 0, -2, 0, -1, -2, + -4, -1, -1, -1, 0, -1, -2, 0, + 0, 0, 0, 0, 0, -1, -1, -1, + 0, 0, 0, 0, 2, -1, 0, -1, + 0, 0, 0, -1, -2, -1, -1, -2, + -1, 0, 1, 5, 0, 0, -3, 0, + -1, 3, 0, -1, -5, -2, 2, 0, + 0, -6, -2, 1, -2, 1, 0, -1, + -1, -4, 0, -2, 1, 0, 0, -2, + 0, 0, 0, 1, 1, -3, -2, 0, + -2, -1, -2, -1, -1, 0, -2, 1, + -2, -2, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, -1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, 0, 0, -2, + 0, 0, -1, -1, 0, 0, 0, 0, + -1, 0, 0, 0, 0, -1, 0, 0, + 0, 0, 0, -1, 0, 0, 0, 0, + -2, 0, -3, 0, 0, 0, -4, 0, + 1, -3, 3, 0, -1, -6, 0, 0, + -3, -1, 0, -5, -3, -4, 0, 0, + -6, -1, -5, -5, -6, 0, -3, 0, + 1, 9, -2, 0, -3, -1, 0, -1, + -2, -3, -2, -5, -5, -3, -1, 0, + 0, -1, 0, 0, 0, 0, -9, -1, + 4, 3, -3, -5, 0, 0, -4, 0, + -6, -1, -1, 3, -12, -2, 0, 0, + 0, -8, -2, -7, -1, -9, 0, 0, + -9, 0, 8, 0, 0, -1, 0, 0, + 0, 0, -1, -1, -5, -1, 0, -8, + 0, 0, 0, 0, -4, 0, -1, 0, + 0, -4, -6, 0, 0, -1, -2, -4, + -1, 0, -1, 0, 0, 0, 0, -6, + -1, -4, -4, -1, -2, -3, -1, -2, + 0, -3, -1, -4, -2, 0, -2, -2, + -1, -2, 0, 1, 0, -1, -4, 0, + 3, 0, -2, 0, 0, 0, 0, 2, + 0, 1, -3, 5, 0, -1, -1, -2, + 0, 0, 0, 0, 0, 0, -4, 0, + -1, 0, -2, -1, 0, -3, -3, -4, + -1, 0, -3, 1, 5, 0, 0, 0, + 0, 10, 0, 0, 1, 0, 0, -2, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -1, -3, 0, 0, 0, 0, 0, -1, + 0, 0, 0, -1, -1, 0, 0, -3, + -1, 0, 0, -3, 0, 2, -1, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 2, 3, 1, -1, 0, -4, + -2, 0, 4, -4, -4, -3, -3, 5, + 2, 1, -11, -1, 3, -1, 0, -1, + 1, -1, -4, 0, -1, 1, -2, -1, + -4, -1, 0, 0, 4, 3, 0, -4, + 0, -7, -2, 4, -2, -5, 0, -2, + -4, -4, -1, 5, 1, 0, -2, 0, + -3, 0, 1, 4, -3, -5, -5, -3, + 4, 0, 0, -9, -1, 1, -2, -1, + -3, 0, -3, -5, -2, -2, -1, 0, + 0, -3, -3, -1, 0, 4, 3, -1, + -7, 0, -7, -2, 0, -4, -7, 0, + -4, -2, -4, -4, 3, 0, 0, -2, + 0, -3, -1, 0, -1, -2, 0, 2, + -4, 1, 0, 0, -7, 0, -1, -3, + -2, -1, -4, -3, -4, -3, 0, -4, + -1, -3, -2, -4, -1, 0, 0, 0, + 6, -2, 0, -4, -1, 0, -1, -3, + -3, -3, -4, -5, -2, -3, 3, 0, + -2, 0, -6, -2, 1, 3, -4, -5, + -3, -4, 4, -1, 1, -12, -2, 3, + -3, -2, -5, 0, -4, -5, -2, -1, + -1, -1, -3, -4, 0, 0, 0, 4, + 4, -1, -8, 0, -8, -3, 3, -5, + -9, -3, -4, -5, -6, -4, 3, 0, + 0, 0, 0, -2, 0, 0, 1, -2, + 3, 1, -2, 3, 0, 0, -4, 0, + 0, 0, 0, 0, 0, -1, 0, 0, + 0, 0, 0, 0, -1, 0, 0, 0, + 0, 1, 4, 0, 0, -2, 0, 0, + 0, 0, -1, -1, -2, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 1, 0, + -1, 0, 5, 0, 2, 0, 0, -2, + 0, 3, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -8, 0, -1, 2, 0, 4, + 0, 0, 13, 2, -3, -3, 1, 1, + -1, 0, -6, 0, 0, 6, -8, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -9, 5, 18, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -8, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, 0, 0, -2, + -1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, 0, -3, 0, + 0, 0, 0, 0, 1, 17, -3, -1, + 4, 3, -3, 1, 0, 0, 1, 1, + -2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -17, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -4, + 0, 0, 0, -3, 0, 0, 0, 0, + -3, -1, 0, 0, 0, -3, 0, -2, + 0, -6, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -1, 0, 0, -2, 0, -2, 0, + -3, 0, 0, 0, -2, 1, -2, 0, + 0, -3, -1, -3, 0, 0, -3, 0, + -1, 0, -6, 0, -1, 0, 0, -10, + -2, -5, -1, -5, 0, 0, -9, 0, + -3, -1, 0, 0, 0, 0, 0, 0, + 0, 0, -2, -2, -1, -2, 0, 0, + 0, 0, -3, 0, -3, 2, -1, 3, + 0, -1, -3, -1, -2, -2, 0, -2, + -1, -1, 1, -3, 0, 0, 0, 0, + -11, -1, -2, 0, -3, 0, -1, -6, + -1, 0, 0, -1, -1, 0, 0, 0, + 0, 1, 0, -1, -2, -1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, + 0, -3, 0, -1, 0, 0, 0, -3, + 1, 0, 0, 0, -3, -1, -3, 0, + 0, -4, 0, -1, 0, -6, 0, 0, + 0, 0, -12, 0, -3, -5, -6, 0, + 0, -9, 0, -1, -2, 0, 0, 0, + 0, 0, 0, 0, 0, -1, -2, -1, + -2, 0, 0, 0, 2, -2, 0, 4, + 6, -1, -1, -4, 2, 6, 2, 3, + -3, 2, 5, 2, 4, 3, 3, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 8, 6, -2, -1, 0, -1, + 10, 6, 10, 0, 0, 0, 1, 0, + 0, 5, 0, 0, -2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, -11, -2, -1, -5, + -6, 0, 0, -9, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, -11, -2, -1, + -5, -6, 0, 0, -5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -1, 0, 0, 0, -3, 1, 0, -1, + 1, 2, 1, -4, 0, 0, -1, 1, + 0, 1, 0, 0, 0, 0, -3, 0, + -1, -1, -3, 0, -1, -5, 0, 8, + -1, 0, -3, -1, 0, -1, -2, 0, + -1, -4, -3, -2, 0, 0, 0, -2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, -11, + -2, -1, -5, -6, 0, 0, -9, 0, + 0, 0, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -2, 0, -4, -2, -1, 4, -1, -1, + -5, 0, -1, 0, -1, -3, 0, 3, + 0, 1, 0, 1, -3, -5, -2, 0, + -5, -2, -3, -5, -5, 0, -2, -3, + -2, -2, -1, -1, -2, -1, 0, -1, + 0, 2, 0, 2, -1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -1, -1, -1, 0, 0, + -3, 0, -1, 0, -2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, -1, 0, -2, + 0, 0, 0, 0, -1, 0, 0, -2, + -1, 1, 0, -2, -2, -1, 0, -4, + -1, -3, -1, -2, 0, -2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -9, 0, 4, 0, 0, -2, 0, + 0, 0, 0, -2, 0, -1, 0, 0, + -1, 0, 0, -1, 0, -3, 0, 0, + 5, -2, -4, -4, 1, 1, 1, 0, + -4, 1, 2, 1, 4, 1, 4, -1, + -3, 0, 0, -5, 0, 0, -4, -3, + 0, 0, -3, 0, -2, -2, 0, -2, + 0, -2, 0, -1, 2, 0, -1, -4, + -1, 5, 0, 0, -1, 0, -3, 0, + 0, 2, -3, 0, 1, -1, 1, 0, + 0, -4, 0, -1, 0, 0, -1, 1, + -1, 0, 0, 0, -5, -2, -3, 0, + -4, 0, 0, -6, 0, 5, -1, 0, + -2, 0, 1, 0, -1, 0, -1, -4, + 0, -1, 1, 0, 0, 0, 0, -1, + 0, 0, 1, -2, 0, 0, 0, -2, + -1, 0, -2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -8, 0, 3, 0, + 0, -1, 0, 0, 0, 0, 0, 0, + -1, -1, 0, 0, 0, 3, 0, 3, + 0, 0, 0, 0, 0, -8, -7, 0, + 6, 4, 2, -5, 1, 5, 0, 5, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0 +}; + + +/*Collect the kern class' data in one place*/ +static const lv_font_fmt_txt_kern_classes_t kern_classes = { + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 61, + .right_class_cnt = 49, +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = &kern_classes, + .kern_scale = 16, + .cmap_num = 2, + .bpp = 4, + .kern_classes = 1, + .bitmap_format = 0 +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +lv_font_t lv_font_montserrat_8 = { + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 10, /*The maximum line height required by the font*/ + .base_line = 2, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) + .underline_position = -1, + .underline_thickness = 0, +#endif + .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +}; + + + +#endif /*#if LV_FONT_MONTSERRAT_8*/ + diff --git a/src/lv_gpu/lv_gpu_nxp_pxp.c b/src/lv_gpu/lv_gpu_nxp_pxp.c index 7efa6341f..d8ea7532a 100644 --- a/src/lv_gpu/lv_gpu_nxp_pxp.c +++ b/src/lv_gpu/lv_gpu_nxp_pxp.c @@ -32,7 +32,7 @@ * INCLUDES *********************/ -#include "lv_conf.h" +#include "../lv_conf_internal.h" #if LV_USE_GPU_NXP_PXP @@ -48,9 +48,6 @@ * DEFINES *********************/ -/* PXP instance ID */ -#define PXP_ID PXP - #if LV_COLOR_16_SWAP #error Color swap not implemented. Disable LV_COLOR_16_SWAP feature. #endif @@ -76,7 +73,8 @@ static void lv_gpu_nxp_pxp_run(void); static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width, const lv_color_t * src, lv_coord_t src_width, lv_coord_t copy_width, lv_coord_t copy_height, lv_opa_t opa, lv_color_t recolor, lv_opa_t recolorOpa); -static void lv_gpu_nxp_invalidate_cache(uint32_t address, uint32_t width, uint32_t height, uint32_t stride, uint32_t pxSize); +static void lv_gpu_nxp_invalidate_cache(uint32_t address, uint32_t width, uint32_t height, uint32_t stride, + uint32_t pxSize); /********************** * STATIC VARIABLES @@ -135,7 +133,7 @@ void lv_gpu_nxp_pxp_deinit(void) { pxp_cfg.pxp_interrupt_deinit(); PXP_DisableInterrupts(PXP, kPXP_CompleteInterruptEnable); - PXP_Deinit(PXP_ID); + PXP_Deinit(LV_GPU_NXP_PXP_ID); } @@ -151,8 +149,8 @@ void lv_gpu_nxp_pxp_deinit(void) void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa) { - PXP_Init(PXP_ID); - PXP_EnableCsc1(PXP_ID, false); /* Disable CSC1, it is enabled by default. */ + PXP_Init(LV_GPU_NXP_PXP_ID); + PXP_EnableCsc1(LV_GPU_NXP_PXP_ID, false); /* Disable CSC1, it is enabled by default. */ PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /* Block size 16x16 for higher performance */ /* OUT buffer configure */ @@ -165,14 +163,15 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_ .width = fill_area->x2 - fill_area->x1 + 1, .height = fill_area->y2 - fill_area->y1 + 1, }; - lv_gpu_nxp_invalidate_cache(outputConfig.buffer0Addr, outputConfig.width, outputConfig.height, outputConfig.pitchBytes, sizeof(lv_color_t)); - PXP_SetOutputBufferConfig(PXP_ID, &outputConfig); + lv_gpu_nxp_invalidate_cache(outputConfig.buffer0Addr, outputConfig.width, outputConfig.height, outputConfig.pitchBytes, + sizeof(lv_color_t)); + PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputConfig); if(opa > LV_OPA_MAX) { /* Simple color fill without opacity - AS disabled, PS as color generator */ - PXP_SetAlphaSurfacePosition(PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /* Disable AS. */ - PXP_SetProcessSurfacePosition(PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /* Disable PS. */ - PXP_SetProcessSurfaceBackGroundColor(PXP_ID, lv_color_to32(color)); + PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /* Disable AS. */ + PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /* Disable PS. */ + PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(color)); } else { /* Fill with opacity - AS used as source (same as OUT), PS used as color generator, blended together */ @@ -184,12 +183,13 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_ asBufferConfig.bufferAddr = (uint32_t)outputConfig.buffer0Addr; asBufferConfig.pitchBytes = outputConfig.pitchBytes; - PXP_SetAlphaSurfaceBufferConfig(PXP_ID, &asBufferConfig); - PXP_SetAlphaSurfacePosition(PXP_ID, 0U, 0U, fill_area->x2 - fill_area->x1 + 1, fill_area->y2 - fill_area->y1 + 1); + PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig); + PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, fill_area->x2 - fill_area->x1 + 1, + fill_area->y2 - fill_area->y1 + 1); /* Disable PS, use as color generator */ - PXP_SetProcessSurfacePosition(PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); - PXP_SetProcessSurfaceBackGroundColor(PXP_ID, lv_color_to32(color)); + PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); + PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(color)); /* Configure Porter-Duff blending - For RGB 565 only! */ pdConfig.enable = 1; @@ -203,7 +203,7 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_ pdConfig.dstGlobalAlpha = 255 - opa; pdConfig.srcAlphaMode = kPXP_PorterDuffAlphaStraight; /* don't care */ pdConfig.dstAlphaMode = kPXP_PorterDuffAlphaStraight; /* don't care */ - PXP_SetPorterDuffConfig(PXP_ID, &pdConfig); + PXP_SetPorterDuffConfig(LV_GPU_NXP_PXP_ID, &pdConfig); } lv_gpu_nxp_pxp_run(); /* Start PXP task */ @@ -249,7 +249,7 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_colo if(opa >= LV_OPA_MAX && !colorKeyEnabled) { /* Simple blit, no effect - Disable PS buffer */ - PXP_SetProcessSurfacePosition(PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); + PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); } else { /* Alpha blending or color keying enabled - PS must be enabled to fetch background pixels @@ -263,24 +263,25 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_colo .pitchBytes = dest_width * sizeof(lv_color_t) }; asBlendConfig.alphaMode = kPXP_AlphaOverride; - PXP_SetProcessSurfaceBufferConfig(PXP_ID, &psBufferConfig); - PXP_SetProcessSurfacePosition(PXP_ID, 0U, 0U, copy_width - 1, copy_height - 1); + PXP_SetProcessSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &psBufferConfig); + PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, copy_width - 1, copy_height - 1); } /* AS buffer - source image */ asBufferConfig.pixelFormat = PXP_AS_PIXEL_FORMAT; asBufferConfig.bufferAddr = (uint32_t)src; asBufferConfig.pitchBytes = src_width * sizeof(lv_color_t); - PXP_SetAlphaSurfaceBufferConfig(PXP_ID, &asBufferConfig); - PXP_SetAlphaSurfacePosition(PXP_ID, 0U, 0U, copy_width - 1U, copy_height - 1U); - PXP_SetAlphaSurfaceBlendConfig(PXP_ID, &asBlendConfig); + PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig); + PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, copy_width - 1U, copy_height - 1U); + PXP_SetAlphaSurfaceBlendConfig(LV_GPU_NXP_PXP_ID, &asBlendConfig); - lv_gpu_nxp_invalidate_cache(asBufferConfig.bufferAddr, copy_width, copy_height, asBufferConfig.pitchBytes, sizeof(lv_color_t)); + lv_gpu_nxp_invalidate_cache(asBufferConfig.bufferAddr, copy_width, copy_height, asBufferConfig.pitchBytes, + sizeof(lv_color_t)); if(colorKeyEnabled) { - PXP_SetAlphaSurfaceOverlayColorKey(PXP_ID, colorKey, colorKey); + PXP_SetAlphaSurfaceOverlayColorKey(LV_GPU_NXP_PXP_ID, colorKey, colorKey); } - PXP_EnableAlphaSurfaceOverlayColorKey(PXP_ID, colorKeyEnabled); + PXP_EnableAlphaSurfaceOverlayColorKey(LV_GPU_NXP_PXP_ID, colorKeyEnabled); /* Output buffer. */ @@ -291,9 +292,10 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_colo outputBufferConfig.pitchBytes = dest_width * sizeof(lv_color_t); outputBufferConfig.width = copy_width; outputBufferConfig.height = copy_height; - PXP_SetOutputBufferConfig(PXP_ID, &outputBufferConfig); + PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputBufferConfig); - lv_gpu_nxp_invalidate_cache(outputBufferConfig.buffer0Addr, outputBufferConfig.width, outputBufferConfig.height, outputBufferConfig.pitchBytes, sizeof(lv_color_t)); + lv_gpu_nxp_invalidate_cache(outputBufferConfig.buffer0Addr, outputBufferConfig.width, outputBufferConfig.height, + outputBufferConfig.pitchBytes, sizeof(lv_color_t)); lv_gpu_nxp_pxp_run(); /* Start PXP task */ } @@ -395,14 +397,15 @@ static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width asBufferConfig.pixelFormat = PXP_AS_PIXEL_FORMAT; asBufferConfig.bufferAddr = (uint32_t)src; asBufferConfig.pitchBytes = src_width * sizeof(lv_color_t); - PXP_SetAlphaSurfaceBufferConfig(PXP_ID, &asBufferConfig); - PXP_SetAlphaSurfacePosition(PXP_ID, 0U, 0U, copy_width - 1U, copy_height - 1U); + PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig); + PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, copy_width - 1U, copy_height - 1U); - lv_gpu_nxp_invalidate_cache(asBufferConfig.bufferAddr, copy_width, copy_height, asBufferConfig.pitchBytes, sizeof(lv_color_t)); + lv_gpu_nxp_invalidate_cache(asBufferConfig.bufferAddr, copy_width, copy_height, asBufferConfig.pitchBytes, + sizeof(lv_color_t)); /* Disable PS buffer, use as color generator */ - PXP_SetProcessSurfacePosition(PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); - PXP_SetProcessSurfaceBackGroundColor(PXP_ID, lv_color_to32(recolor)); + PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); + PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(recolor)); /* Output buffer */ outputBufferConfig.pixelFormat = (pxp_output_pixel_format_t)PXP_OUT_PIXEL_FORMAT; @@ -412,9 +415,10 @@ static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width outputBufferConfig.pitchBytes = dest_width * sizeof(lv_color_t); outputBufferConfig.width = copy_width; outputBufferConfig.height = copy_height; - PXP_SetOutputBufferConfig(PXP_ID, &outputBufferConfig); + PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputBufferConfig); - lv_gpu_nxp_invalidate_cache(outputBufferConfig.buffer0Addr, outputBufferConfig.width, outputBufferConfig.height, outputBufferConfig.pitchBytes, sizeof(lv_color_t)); + lv_gpu_nxp_invalidate_cache(outputBufferConfig.buffer0Addr, outputBufferConfig.width, outputBufferConfig.height, + outputBufferConfig.pitchBytes, sizeof(lv_color_t)); pxp_porter_duff_config_t pdConfig; @@ -430,7 +434,7 @@ static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width pdConfig.dstGlobalAlpha = 255 - recolorOpa; pdConfig.srcAlphaMode = kPXP_PorterDuffAlphaStraight; /* don't care */ pdConfig.dstAlphaMode = kPXP_PorterDuffAlphaStraight; /* don't care */ - PXP_SetPorterDuffConfig(PXP_ID, &pdConfig); + PXP_SetPorterDuffConfig(LV_GPU_NXP_PXP_ID, &pdConfig); lv_gpu_nxp_pxp_run(); /* Start PXP task */ @@ -463,11 +467,13 @@ static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width * @param[in] stride stride in bytes * @param[in] pxSize pixel size in bytes */ -static void lv_gpu_nxp_invalidate_cache(uint32_t address, uint32_t width, uint32_t height, uint32_t stride, uint32_t pxSize) { +static void lv_gpu_nxp_invalidate_cache(uint32_t address, uint32_t width, uint32_t height, uint32_t stride, + uint32_t pxSize) +{ int y; - for (y = 0; y < height; y++) { - DCACHE_CleanInvalidateByRange(address, width*pxSize); + for(y = 0; y < height; y++) { + DCACHE_CleanInvalidateByRange(address, width * pxSize); address += stride; } } diff --git a/src/lv_gpu/lv_gpu_nxp_pxp.h b/src/lv_gpu/lv_gpu_nxp_pxp.h index 10207dd30..e3f10a445 100644 --- a/src/lv_gpu/lv_gpu_nxp_pxp.h +++ b/src/lv_gpu/lv_gpu_nxp_pxp.h @@ -45,30 +45,30 @@ extern "C" { * DEFINES *********************/ -/* PXP module instance to use */ -#define PXP_ID PXP +/** PXP module instance to use */ +#define LV_GPU_NXP_PXP_ID PXP -/* PXP interrupt line ID */ -#define PXP_IRQ_ID PXP_IRQn +/** PXP interrupt line ID */ +#define LV_GPU_NXP_PXP_IRQ_ID PXP_IRQn -/* Minimum area for image copy with 100% opacity to be handled by PXP */ -#ifndef GPU_NXP_PXP_BLIT_SIZE_LIMIT -#define GPU_NXP_PXP_BLIT_SIZE_LIMIT 1 +#ifndef LV_GPU_NXP_PXP_BLIT_SIZE_LIMIT +/** Minimum area (in pixels) for image copy with 100% opacity to be handled by PXP */ +#define LV_GPU_NXP_PXP_BLIT_SIZE_LIMIT 32 #endif -/* Minimum area for image copy with transparency to be handled by PXP */ -#ifndef GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT -#define GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT 16 +#ifndef LV_GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT +/** Minimum area (in pixels) for image copy with transparency to be handled by PXP */ +#define LV_GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT 16 #endif -/* Minimum area to be filled by PXP with 100% opacity */ -#ifndef GPU_NXP_PXP_FILL_SIZE_LIMIT -#define GPU_NXP_PXP_FILL_SIZE_LIMIT 64 +#ifndef LV_GPU_NXP_PXP_FILL_SIZE_LIMIT +/** Minimum area (in pixels) to be filled by PXP with 100% opacity */ +#define LV_GPU_NXP_PXP_FILL_SIZE_LIMIT 64 #endif -/* Minimum area to be filled by PXP with transparency */ -#ifndef GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT -#define GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT 32 +#ifndef LV_GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT +/** Minimum area (in pixels) to be filled by PXP with transparency */ +#define LV_GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT 32 #endif /********************** @@ -107,7 +107,7 @@ typedef struct { * * @return LV_RES_OK: PXP init ok; LV_RES_INV: init error. See error log for more information. */ -lv_res_t lv_gpu_nxp_pxp_init(lv_nxp_pxp_cfg_t *cfg); +lv_res_t lv_gpu_nxp_pxp_init(lv_nxp_pxp_cfg_t * cfg); /** * Disable PXP device. Should be called during display deinit sequence. @@ -123,7 +123,8 @@ void lv_gpu_nxp_pxp_deinit(void); * @param[in] color color * @param[in] opa transparency of the color */ -void lv_gpu_nxp_pxp_fill(lv_color_t *dest_buf, lv_coord_t dest_width, const lv_area_t *fill_area, lv_color_t color, lv_opa_t opa); +void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_area_t * fill_area, lv_color_t color, + lv_opa_t opa); @@ -143,7 +144,8 @@ void lv_gpu_nxp_pxp_fill(lv_color_t *dest_buf, lv_coord_t dest_width, const lv_a * @param[in] copy_h height of area to be copied from src to dest * @param[in] opa opacity of the result */ -void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_color_t * src, lv_coord_t src_width, lv_coord_t copy_width, lv_coord_t copy_height, lv_opa_t opa); +void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_color_t * src, lv_coord_t src_width, + lv_coord_t copy_width, lv_coord_t copy_height, lv_opa_t opa); /** diff --git a/src/lv_gpu/lv_gpu_nxp_pxp_osa.c b/src/lv_gpu/lv_gpu_nxp_pxp_osa.c index eb23fbbe3..19b4a12f1 100644 --- a/src/lv_gpu/lv_gpu_nxp_pxp_osa.c +++ b/src/lv_gpu/lv_gpu_nxp_pxp_osa.c @@ -31,7 +31,7 @@ * INCLUDES *********************/ -#include "lv_conf.h" +#include "../lv_conf_internal.h" #if LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT @@ -86,8 +86,8 @@ void PXP_IRQHandler(void) BaseType_t taskAwake = pdFALSE; #endif - if(kPXP_CompleteFlag & PXP_GetStatusFlags(PXP_ID)) { - PXP_ClearStatusFlags(PXP_ID, kPXP_CompleteFlag); + if(kPXP_CompleteFlag & PXP_GetStatusFlags(LV_GPU_NXP_PXP_ID)) { + PXP_ClearStatusFlags(LV_GPU_NXP_PXP_ID, kPXP_CompleteFlag); #if defined(FSL_RTOS_FREE_RTOS) xSemaphoreGiveFromISR(s_pxpIdle, &taskAwake); portYIELD_FROM_ISR(taskAwake); @@ -113,12 +113,12 @@ static lv_res_t _lv_gpu_nxp_pxp_interrupt_init(void) return LV_RES_INV; } - NVIC_SetPriority(PXP_IRQ_ID, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1); + NVIC_SetPriority(LV_GPU_NXP_PXP_IRQ_ID, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1); #else s_pxpIdle = true; #endif - NVIC_EnableIRQ(PXP_IRQ_ID); + NVIC_EnableIRQ(LV_GPU_NXP_PXP_IRQ_ID); return LV_RES_OK; } @@ -128,7 +128,7 @@ static lv_res_t _lv_gpu_nxp_pxp_interrupt_init(void) */ static void _lv_gpu_nxp_pxp_interrupt_deinit(void) { - NVIC_DisableIRQ(PXP_IRQ_ID); + NVIC_DisableIRQ(LV_GPU_NXP_PXP_IRQ_ID); #if defined(FSL_RTOS_FREE_RTOS) vSemaphoreDelete(s_pxpIdle); #endif @@ -143,8 +143,8 @@ static void _lv_gpu_nxp_pxp_run(void) s_pxpIdle = false; #endif - PXP_EnableInterrupts(PXP_ID, kPXP_CompleteInterruptEnable); - PXP_Start(PXP_ID); + PXP_EnableInterrupts(LV_GPU_NXP_PXP_ID, kPXP_CompleteInterruptEnable); + PXP_Start(LV_GPU_NXP_PXP_ID); #if defined(FSL_RTOS_FREE_RTOS) if(xSemaphoreTake(s_pxpIdle, portMAX_DELAY) != pdTRUE) { diff --git a/src/lv_gpu/lv_gpu_nxp_vglite.c b/src/lv_gpu/lv_gpu_nxp_vglite.c new file mode 100644 index 000000000..8db4bce7a --- /dev/null +++ b/src/lv_gpu/lv_gpu_nxp_vglite.c @@ -0,0 +1,303 @@ +/** + * @file lv_gpu_nxp_vglite.c + * + */ + +/** + * MIT License + * + * Copyright (c) 2020 NXP + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next paragraph) + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +/********************* + * INCLUDES + *********************/ + +#include "../lv_conf_internal.h" + +#if LV_USE_GPU_NXP_VG_LITE + +#include "lvgl.h" +#include "lv_gpu_nxp_vglite.h" +#include "../lv_misc/lv_log.h" +#include "fsl_cache.h" +#include "vg_lite.h" + + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +#if LV_COLOR_DEPTH==16 + #define VGLITE_PX_FMT VG_LITE_RGB565 +#else + #error Only 16bit color depth is supported. Set LV_COLOR_DEPTH to 16. +#endif + +/********************** + * STATIC PROTOTYPES + **********************/ + +static lv_res_t init_vg_buf(vg_lite_buffer_t * dst, uint32_t width, uint32_t height, uint32_t stride, + const lv_color_t * ptr); + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/*** + * Fills rectangular area in buffer. + * @param[in] dest_buf Destination buffer pointer (must be aligned on 32 bytes) + * @param[in] dest_width Destination buffer width in pixels (must be aligned on 16 px) + * @param[in] dest_height Destination buffer height in pixels + * @param[in] fill_area Area to be filled + * @param[in] color Fill color + * @param[in] opa Opacity (255 = full, 128 = 50% background/50% color, 0 = no fill) + * @retval LV_RES_OK Fill completed + * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS) + */ +lv_res_t lv_gpu_nxp_vglite_fill(lv_color_t * dest_buf, lv_coord_t dest_width, lv_coord_t dest_height, + const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa) +{ + vg_lite_buffer_t rt; + vg_lite_rectangle_t rect; + vg_lite_error_t err = VG_LITE_SUCCESS; + lv_color32_t col32 = {.full = lv_color_to32(color)}; /* Convert color to RGBA8888 */ + lv_disp_t * disp = _lv_refr_get_disp_refreshing(); + + if(init_vg_buf(&rt, dest_width, dest_height, dest_width * sizeof(lv_color_t), dest_buf) != LV_RES_OK) { +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("init_vg_buf reported error. Fill failed."); +#endif + return LV_RES_INV; + } + + if(opa >= LV_OPA_MAX) { /* Opaque fill */ + rect.x = fill_area->x1; + rect.y = fill_area->y1; + rect.width = (fill_area->x2 - fill_area->x1) + 1; + rect.height = (fill_area->y2 - fill_area->y1) + 1; + + if(disp && disp->driver.clean_dcache_cb) { /* Clean & invalidate cache */ + disp->driver.clean_dcache_cb(&disp->driver); + } + + err |= vg_lite_clear(&rt, &rect, col32.full); + err |= vg_lite_finish(); + } + else { /* fill with transparency */ + + + vg_lite_path_t path; + lv_color32_t colMix; + int16_t path_data[] = { /* VG rectangular path */ + VLC_OP_MOVE, fill_area->x1, fill_area->y1, + VLC_OP_LINE, fill_area->x2 + 1, fill_area->y1, + VLC_OP_LINE, fill_area->x2 + 1, fill_area->y2 + 1, + VLC_OP_LINE, fill_area->x1, fill_area->y2 + 1, + VLC_OP_LINE, fill_area->x1, fill_area->y1, + VLC_OP_END + }; + + + err |= vg_lite_init_path(&path, VG_LITE_S16, VG_LITE_LOW, sizeof(path_data), path_data, + fill_area->x1, fill_area->y1, fill_area->x2 + 1, fill_area->y2 + 1); + if(err != VG_LITE_SUCCESS) { +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("vg_lite_init_path() failed."); +#endif + return LV_RES_INV; + } + + colMix.ch.red = ((uint16_t)col32.ch.red * opa) >> 8; /* Pre-multiply color */ + colMix.ch.green = ((uint16_t)col32.ch.green * opa) >> 8; + colMix.ch.blue = ((uint16_t)col32.ch.blue * opa) >> 8; + colMix.ch.alpha = opa; + + if(disp && disp->driver.clean_dcache_cb) { /* Clean & invalidate cache */ + disp->driver.clean_dcache_cb(&disp->driver); + } + + vg_lite_matrix_t matrix; + vg_lite_identity(&matrix); + + /* Draw rectangle */ + err |= vg_lite_draw(&rt, &path, VG_LITE_FILL_EVEN_ODD, &matrix, VG_LITE_BLEND_SRC_OVER, colMix.full); + if(err) { +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("vg_lite_draw() failed."); +#endif + vg_lite_clear_path(&path); + return LV_RES_INV; + } + + err |= vg_lite_finish(); + err |= vg_lite_clear_path(&path); + } + + if(err == VG_LITE_SUCCESS) { + return LV_RES_OK; + } + else { +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("VG Lite Fill failed."); +#endif + return LV_RES_INV; + } +} + + +/*** + * BLock Image Transfer. + * @param[in] blit Description of the transfer + * @retval LV_RES_OK Transfer complete + * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS) + */ +lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit) +{ + vg_lite_buffer_t src_vgbuf, dst_vgbuf; + vg_lite_error_t err = VG_LITE_SUCCESS; + uint32_t rect[4]; + lv_disp_t * disp = _lv_refr_get_disp_refreshing(); + + if(blit->opa < LV_OPA_MIN) { + return LV_RES_OK; /* Nothing to BLIT */ + } + + if(!blit) { + /* Wrong parameter */ + return LV_RES_INV; + } + + /* Wrap src/dst buffer into VG-Lite buffer */ + if(init_vg_buf(&src_vgbuf, blit->src_width, blit->src_height, blit->src_stride, blit->src) != LV_RES_OK) { +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("init_vg_buf reported error. BLIT failed."); +#endif + return LV_RES_INV; + } + + if(init_vg_buf(&dst_vgbuf, blit->dst_width, blit->dst_height, blit->dst_stride, blit->dst) != LV_RES_OK) { +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("init_vg_buf reported error. BLIT failed."); +#endif + return LV_RES_INV; + } + + rect[0] = 0; /* Crop */ + rect[1] = 0; + rect[2] = blit->src_width; + rect[3] = blit->src_height; + + vg_lite_matrix_t matrix; + vg_lite_identity(&matrix); + vg_lite_translate(blit->dst_area.x1, blit->dst_area.y1, &matrix); + + if(disp && disp->driver.clean_dcache_cb) { /* Clean & invalidate cache */ + disp->driver.clean_dcache_cb(&disp->driver); + } + + uint32_t color; + vg_lite_blend_t blend; + if(blit->opa >= LV_OPA_MAX) { + color = 0x0; + blend = VG_LITE_BLEND_NONE; + } + else { + color = ((blit->opa) << 24) | ((blit->opa) << 16) | ((blit->opa) << 8) | (blit->opa); + blend = VG_LITE_BLEND_SRC_OVER; + src_vgbuf.image_mode = VG_LITE_MULTIPLY_IMAGE_MODE; + } + err |= vg_lite_blit_rect(&dst_vgbuf, &src_vgbuf, rect, &matrix, blend, color, VG_LITE_FILTER_POINT); + + err |= vg_lite_finish(); + + if(err == VG_LITE_SUCCESS) { + return LV_RES_OK; + } + else { +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("vg_lite_blit_rect or vg_lite_finish reported error. BLIT failed."); +#endif + return LV_RES_INV; + } +} + +/********************** + * STATIC FUNCTIONS + **********************/ + +/*** + * Fills vg_lite_buffer_t structure according given parameters. + * @param[out] dst Buffer structure to be filled + * @param[in] width Width of buffer in pixels + * @param[in] height Height of buffer in pixels + * @param[in] stride Stride of the buffer in bytes + * @param[in] ptr Pointer to the buffer (must be aligned according VG-Lite requirements) + */ +static lv_res_t init_vg_buf(vg_lite_buffer_t * dst, uint32_t width, uint32_t height, uint32_t stride, + const lv_color_t * ptr) +{ + if((((uintptr_t)ptr) % LV_ATTRIBUTE_MEM_ALIGN_SIZE) != 0x0) { /* Test for alignment */ +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("ptr (0x%X) not aligned to %d.", (size_t) ptr, LV_ATTRIBUTE_MEM_ALIGN_SIZE); +#endif + return LV_RES_INV; + } + + if((stride % LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX) != 0x0) { /* Test for stride alignment */ +#if LV_GPU_NXP_VG_LITE_LOG_ERRORS + LV_LOG_ERROR("Buffer stride (%d px) not aligned to %d px.", stride, LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX); +#endif + return LV_RES_INV; + } + + dst->format = VGLITE_PX_FMT; + dst->tiled = VG_LITE_LINEAR; + dst->image_mode = VG_LITE_NORMAL_IMAGE_MODE; + dst->transparency_mode = VG_LITE_IMAGE_OPAQUE; + + dst->width = width; + dst->height = height; + dst->stride = stride; + + memset(&dst->yuv, 0, sizeof(dst->yuv)); + + dst->memory = (void *) ptr; + dst->address = (uint32_t) dst->memory; + dst->handle = 0x0; + + return LV_RES_OK; +} + +#endif /* LV_USE_GPU_NXP_VG_LITE */ diff --git a/src/lv_gpu/lv_gpu_nxp_vglite.h b/src/lv_gpu/lv_gpu_nxp_vglite.h new file mode 100644 index 000000000..a92259620 --- /dev/null +++ b/src/lv_gpu/lv_gpu_nxp_vglite.h @@ -0,0 +1,133 @@ +/** + * @file lv_gpu_nxp_vglite.h + * + */ + +/** + * MIT License + * + * Copyright (c) 2020 NXP + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next paragraph) + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef LV_SRC_LV_GPU_LV_GPU_NXP_VGLITE_H_ +#define LV_SRC_LV_GPU_LV_GPU_NXP_VGLITE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#include "lv_misc/lv_area.h" + +/********************* + * DEFINES + *********************/ + +/** Stride in px required by VG-Lite HW. Don't change this. */ +#define LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX 16 + +#ifndef LV_GPU_NXP_VG_LITE_FILL_SIZE_LIMIT +/** Minimum area (in pixels) to be filled by VG-Lite with 100% opacity */ +#define LV_GPU_NXP_VG_LITE_FILL_SIZE_LIMIT 32 +#endif + +#ifndef LV_GPU_NXP_VG_LITE_FILL_OPA_SIZE_LIMIT +/** Minimum area (in pixels) to be filled by VG-Lite with transparency */ +#define LV_GPU_NXP_VG_LITE_FILL_OPA_SIZE_LIMIT 32 +#endif + +#ifndef LV_GPU_NXP_VG_LITE_BLIT_SIZE_LIMIT +/** Minimum area (in pixels) for image copy with 100% opacity to be handled by VG-Lite */ +#define LV_GPU_NXP_VG_LITE_BLIT_SIZE_LIMIT 32 +#endif + +#ifndef LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT +/** Minimum area (in pixels) for image copy with transparency to be handled by VG-Lite */ +#define LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT 32 +#endif + +#ifndef LV_GPU_NXP_VG_LITE_LOG_ERRORS +/** Enable logging of VG-Lite erors (\see LV_LOG_ERROR) */ +#define LV_GPU_NXP_VG_LITE_LOG_ERRORS 1 +#endif + +/********************** + * TYPEDEFS + **********************/ + +/** + * BLock Image Transfer descriptor structure + */ +typedef struct { + + const lv_color_t * src; /**< Source buffer pointer (must be aligned on 32 bytes) */ + lv_area_t src_area; /**< Area to be copied from source */ + lv_coord_t src_width; /**< Source buffer width */ + lv_coord_t src_height; /**< Source buffer height */ + uint32_t src_stride; /**< Source buffer stride in bytes (must be aligned on 16 px) */ + + const lv_color_t * dst; /**< Destination buffer pointer (must be aligned on 32 bytes) */ + lv_area_t dst_area; /**< Target area in destination buffer (must be the same as src_area) */ + lv_coord_t dst_width; /**< Destination buffer width */ + lv_coord_t dst_height; /**< Destination buffer height */ + uint32_t dst_stride; /**< Destination buffer stride in bytes (must be aligned on 16 px) */ + + lv_opa_t opa; /**< Opacity - alpha mix (0 = source not copied, 255 = 100% opaque) */ + +} lv_gpu_nxp_vglite_blit_info_t; + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/*** + * Fills rectangular area in buffer. + * @param[in] dest_buf Destination buffer pointer (must be aligned on 32 bytes) + * @param[in] dest_width Destination buffer width in pixels ((must be aligned on 16 px) + * @param[in] dest_height Destination buffer height in pixels + * @param[in] fill_area Area to be filled + * @param[in] color Fill color + * @param[in] opa Opacity (255 = full, 128 = 50% background/50% color, 0 = no fill) + * @retval LV_RES_OK Fill completed + * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS) + */ +lv_res_t lv_gpu_nxp_vglite_fill(lv_color_t * dest_buf, lv_coord_t dest_width, lv_coord_t dest_height, + const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa); + +/*** + * BLock Image Transfer. + * @param[in] blit Description of the transfer + * @retval LV_RES_OK Transfer complete + * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS) + */ +lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* LV_SRC_LV_GPU_LV_GPU_NXP_VGLITE_H_ */ diff --git a/src/lv_gpu/lv_gpu_stm32_dma2d.c b/src/lv_gpu/lv_gpu_stm32_dma2d.c index 4fca9c322..ab02ed29c 100644 --- a/src/lv_gpu/lv_gpu_stm32_dma2d.c +++ b/src/lv_gpu/lv_gpu_stm32_dma2d.c @@ -43,7 +43,7 @@ * STATIC PROTOTYPES **********************/ static void invalidate_cache(void); -static void dma2d_wait(void); +static void wait_finish(void); /********************** * STATIC VARIABLES @@ -63,7 +63,16 @@ static void dma2d_wait(void); void lv_gpu_stm32_dma2d_init(void) { /* Enable DMA2D clock */ +#if defined(STM32F4) || defined(STM32F7) RCC->AHB1ENR |= RCC_AHB1ENR_DMA2DEN; +#elif defined(STM32H7) + RCC->AHB3ENR |= RCC_AHB3ENR_DMA2DEN; +#else +# warning "LVGL can't enable the clock of DMA2D" +#endif + + /* Wait for hardware access to complete */ + __asm volatile("DSB\n"); /* Delay after setting peripheral clock */ volatile uint32_t temp = RCC->AHB1ENR; @@ -95,7 +104,7 @@ void lv_gpu_stm32_dma2d_fill(lv_color_t * buf, lv_coord_t buf_w, lv_color_t colo /* start transfer */ DMA2D->CR |= DMA2D_CR_START_Msk; - dma2d_wait(); + wait_finish(); } /** @@ -140,7 +149,7 @@ void lv_gpu_stm32_dma2d_fill_mask(lv_color_t * buf, lv_coord_t buf_w, lv_color_t HAL_DMA2D_ConfigLayer(&hdma2d, 0); HAL_DMA2D_ConfigLayer(&hdma2d, 1); HAL_DMA2D_BlendingStart(&hdma2d, (uint32_t) mask, (uint32_t) buf, (uint32_t)buf, fill_w, fill_h); - dma2d_wait(); + wait_finish(); #endif } @@ -170,7 +179,7 @@ void lv_gpu_stm32_dma2d_copy(lv_color_t * buf, lv_coord_t buf_w, const lv_color_ /* start transfer */ DMA2D->CR |= DMA2D_CR_START_Msk; - dma2d_wait(); + wait_finish(); } /** @@ -208,7 +217,18 @@ void lv_gpu_stm32_dma2d_blend(lv_color_t * buf, lv_coord_t buf_w, const lv_color /* start transfer */ DMA2D->CR |= DMA2D_CR_START_Msk; - dma2d_wait(); + wait_finish(); +} + +void lv_gpu_stm32_dma2d_wait_cb(lv_disp_drv_t * drv) +{ + if(drv && drv->wait_cb) { + while(DMA2D->CR & DMA2D_CR_START_Msk) { + drv->wait_cb(drv); + } + } else { + while(DMA2D->CR & DMA2D_CR_START_Msk); + } } /********************** @@ -226,9 +246,11 @@ static void invalidate_cache(void) } } -static void dma2d_wait(void) +static void wait_finish(void) { lv_disp_t * disp = _lv_refr_get_disp_refreshing(); + if(disp->driver.gpu_wait_cb) return; + while(DMA2D->CR & DMA2D_CR_START_Msk) { if(disp->driver.wait_cb) disp->driver.wait_cb(&disp->driver); } diff --git a/src/lv_gpu/lv_gpu_stm32_dma2d.h b/src/lv_gpu/lv_gpu_stm32_dma2d.h index 9f244a603..f3d468049 100644 --- a/src/lv_gpu/lv_gpu_stm32_dma2d.h +++ b/src/lv_gpu/lv_gpu_stm32_dma2d.h @@ -15,6 +15,7 @@ extern "C" { *********************/ #include "../lv_misc/lv_area.h" #include "../lv_misc/lv_color.h" +#include "../lv_hal/lv_hal_disp.h" /********************* * DEFINES @@ -91,6 +92,14 @@ void lv_gpu_stm32_dma2d_copy(lv_color_t * buf, lv_coord_t buf_w, const lv_color_ */ void lv_gpu_stm32_dma2d_blend(lv_color_t * buf, lv_coord_t buf_w, const lv_color_t * map, lv_opa_t opa, lv_coord_t map_w, lv_coord_t copy_w, lv_coord_t copy_h); + + +/** + * Can be used as `gpu_wait_cb` in display driver to + * let the MCU run while the GPU is working + */ +void lv_gpu_stm32_dma2d_wait_cb(lv_disp_drv_t * drv); + /********************** * MACROS **********************/ diff --git a/src/lv_misc/lv_color.h b/src/lv_misc/lv_color.h index 3b2014f38..cf4d135a0 100644 --- a/src/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -213,12 +213,12 @@ enum { **********************/ typedef union { + uint8_t full; /*must be declared first to set all bits of byte via initializer list */ union { uint8_t blue : 1; uint8_t green : 1; uint8_t red : 1; } ch; - uint8_t full; } lv_color1_t; typedef union { @@ -259,15 +259,19 @@ typedef union { #if LV_COLOR_DEPTH == 1 typedef uint8_t lv_color_int_t; typedef lv_color1_t lv_color_t; +#define _LV_COLOR_ZERO_INITIALIZER {0x00} #elif LV_COLOR_DEPTH == 8 typedef uint8_t lv_color_int_t; typedef lv_color8_t lv_color_t; +#define _LV_COLOR_ZERO_INITIALIZER {{0x00, 0x00, 0x00}} #elif LV_COLOR_DEPTH == 16 typedef uint16_t lv_color_int_t; typedef lv_color16_t lv_color_t; +#define _LV_COLOR_ZERO_INITIALIZER {{0x00, 0x00, 0x00}} #elif LV_COLOR_DEPTH == 32 typedef uint32_t lv_color_int_t; typedef lv_color32_t lv_color_t; +#define _LV_COLOR_ZERO_INITIALIZER {{0x00, 0x00, 0x00, 0x00}} #else #error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!" #endif @@ -553,9 +557,9 @@ LV_ATTRIBUTE_FAST_MEM static inline void lv_color_mix_with_alpha(lv_color_t bg_c /*Save the parameters and the result. If they will be asked again don't compute again*/ static lv_opa_t fg_opa_save = 0; static lv_opa_t bg_opa_save = 0; - static lv_color_t fg_color_save = {.full = 0}; - static lv_color_t bg_color_save = {.full = 0}; - static lv_color_t res_color_saved = {.full = 0}; + static lv_color_t fg_color_save = _LV_COLOR_ZERO_INITIALIZER; + static lv_color_t bg_color_save = _LV_COLOR_ZERO_INITIALIZER; + static lv_color_t res_color_saved = _LV_COLOR_ZERO_INITIALIZER; static lv_opa_t res_opa_saved = 0; if(fg_opa != fg_opa_save || bg_opa != bg_opa_save || fg_color.full != fg_color_save.full || @@ -600,7 +604,7 @@ static inline uint8_t lv_color_brightness(lv_color_t color) /** * MSVC compiler's definition of the __cplusplus indicating 199711L regardless to C++ standard version * see https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-cplusplus -* so we use _MSC_VER macro unstead of __cplusplus +* so we use _MSC_VER macro instead of __cplusplus */ #ifdef _MSC_VER #if _MSC_VER >= 1900 /* Visual Studio 2015 */ @@ -626,7 +630,7 @@ static inline uint8_t lv_color_brightness(lv_color_t color) /* The most simple macro to create a color from R,G and B values */ #if LV_COLOR_DEPTH == 1 -#define LV_COLOR_MAKE(r8, g8, b8) (_LV_COLOR_MAKE_TYPE_HELPER{.full = (uint8_t)((b8 >> 7) | (g8 >> 7) | (r8 >> 7))}) +#define LV_COLOR_MAKE(r8, g8, b8) (_LV_COLOR_MAKE_TYPE_HELPER{(uint8_t)((b8 >> 7) | (g8 >> 7) | (r8 >> 7))}) #elif LV_COLOR_DEPTH == 8 #define LV_COLOR_MAKE(r8, g8, b8) (_LV_COLOR_MAKE_TYPE_HELPER{{(uint8_t)((b8 >> 6) & 0x3U), (uint8_t)((g8 >> 5) & 0x7U), (uint8_t)((r8 >> 5) & 0x7U)}}) #elif LV_COLOR_DEPTH == 16 diff --git a/src/lv_misc/lv_types.h b/src/lv_misc/lv_types.h index a277d57eb..92c75ee39 100644 --- a/src/lv_misc/lv_types.h +++ b/src/lv_misc/lv_types.h @@ -18,7 +18,7 @@ extern "C" { * DEFINES *********************/ -#if __STDC_VERSION__ >= 199901L // If c99 or newer, use stdint.h to determine arch size +#if defined(__cplusplus) || __STDC_VERSION__ >= 199901L // If c99 or newer, use stdint.h to determine arch size #include #endif @@ -53,7 +53,7 @@ typedef uint8_t lv_res_t; -#if __STDC_VERSION__ >= 199901L +#if defined(__cplusplus) || __STDC_VERSION__ >= 199901L // If c99 or newer, use the definition of uintptr_t directly from typedef uintptr_t lv_uintptr_t; diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index 82f5082ae..8f3f09834 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -64,7 +64,7 @@ #define COLOR_BG_SEC_TEXT (IS_LIGHT ? lv_color_hex(0x31404f) : lv_color_hex(0xa5a8ad)) #define COLOR_BG_SEC_TEXT_DIS (IS_LIGHT ? lv_color_hex(0xaaaaaa) : lv_color_hex(0xa5a8ad)) -#define TRANSITION_TIME ((theme.flags & LV_THEME_MATERIAL_FLAG_NO_TRANSITION) ? 0 : 150) +#define TRANSITION_TIME 0/*((theme.flags & LV_THEME_MATERIAL_FLAG_NO_TRANSITION) ? 0 : 150)*/ #define BORDER_WIDTH LV_DPX(2) #define OUTLINE_WIDTH ((theme.flags & LV_THEME_MATERIAL_FLAG_NO_FOCUS) ? 0 : LV_DPX(2)) #define IS_LIGHT (theme.flags & LV_THEME_MATERIAL_FLAG_LIGHT) @@ -215,7 +215,8 @@ static void basic_init(void) lv_style_set_bg_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR); lv_style_set_text_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR_TEXT); lv_style_set_value_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR_TEXT); - lv_style_set_text_font(&styles->scr, LV_STATE_DEFAULT, theme.font_normal); + lv_style_set_text_sel_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR_TEXT); + lv_style_set_text_sel_bg_color(&styles->scr, LV_STATE_DEFAULT, theme.color_primary); lv_style_set_value_font(&styles->scr, LV_STATE_DEFAULT, theme.font_normal); style_init_reset(&styles->bg); @@ -228,7 +229,6 @@ static void basic_init(void) lv_style_set_border_color(&styles->bg, LV_STATE_EDITED, theme.color_secondary); lv_style_set_border_width(&styles->bg, LV_STATE_DEFAULT, BORDER_WIDTH); lv_style_set_border_post(&styles->bg, LV_STATE_DEFAULT, true); - lv_style_set_text_font(&styles->bg, LV_STATE_DEFAULT, theme.font_normal); lv_style_set_text_color(&styles->bg, LV_STATE_DEFAULT, COLOR_BG_TEXT); lv_style_set_value_font(&styles->bg, LV_STATE_DEFAULT, theme.font_normal); lv_style_set_value_color(&styles->bg, LV_STATE_DEFAULT, COLOR_BG_TEXT); @@ -561,10 +561,12 @@ static void calendar_init(void) #if LV_USE_CALENDAR style_init_reset(&styles->calendar_header); - lv_style_set_pad_top(&styles->calendar_header, LV_STATE_DEFAULT, PAD_DEF); + lv_style_set_pad_top(&styles->calendar_header, LV_STATE_DEFAULT, 0); lv_style_set_pad_left(&styles->calendar_header, LV_STATE_DEFAULT, PAD_DEF); lv_style_set_pad_right(&styles->calendar_header, LV_STATE_DEFAULT, PAD_DEF); - lv_style_set_pad_bottom(&styles->calendar_header, LV_STATE_DEFAULT, PAD_DEF); + lv_style_set_pad_bottom(&styles->calendar_header, LV_STATE_DEFAULT, 0); + lv_style_set_margin_top(&styles->calendar_header, LV_STATE_DEFAULT, PAD_DEF); + lv_style_set_margin_bottom(&styles->calendar_header, LV_STATE_DEFAULT, PAD_DEF); lv_style_set_text_color(&styles->calendar_header, LV_STATE_PRESSED, IS_LIGHT ? lv_color_hex(0x888888) : LV_COLOR_WHITE); style_init_reset(&styles->calendar_daynames); @@ -855,7 +857,6 @@ static void tabview_win_shared_init(void) lv_style_set_border_width(&styles->tabview_btns_bg, LV_STATE_DEFAULT, LV_DPX(5)); lv_style_set_border_side(&styles->tabview_btns_bg, LV_STATE_DEFAULT, LV_BORDER_SIDE_BOTTOM); lv_style_set_text_color(&styles->tabview_btns_bg, LV_STATE_DEFAULT, COLOR_SCR_TEXT); - lv_style_set_text_font(&styles->tabview_btns_bg, LV_STATE_DEFAULT, theme.font_normal); lv_style_set_image_recolor(&styles->tabview_btns_bg, LV_STATE_DEFAULT, lv_color_hex(0x979a9f)); lv_style_set_pad_top(&styles->tabview_btns_bg, LV_STATE_DEFAULT, LV_DPX(7)); lv_style_set_pad_left(&styles->tabview_btns_bg, LV_STATE_DEFAULT, LV_DPX(7)); @@ -1261,27 +1262,32 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj, lv_theme_style_t name) _lv_style_list_add_style(list, &styles->pad_small); _lv_style_list_add_style(list, &styles->chart_series_bg); +<<<<<<< HEAD list = _lv_obj_get_style_list(obj, LV_CHART_PART_SERIES); +======= + list = _lv_obj_get_style_list(obj, LV_CHART_PART_CURSOR); + _lv_style_list_add_style(list, &styles->chart_series_bg); + + list = _lv_obj_get_style_list(obj, LV_CHART_PART_SERIES); +>>>>>>> dev _lv_style_list_add_style(list, &styles->chart_series); break; #endif #if LV_USE_TABLE - case LV_THEME_TABLE: - { - list = _lv_obj_get_style_list(obj, LV_TABLE_PART_BG); - _lv_style_list_add_style(list, &styles->bg); - _lv_style_list_add_style(list, &styles->sb); + case LV_THEME_TABLE: { + list = _lv_obj_get_style_list(obj, LV_TABLE_PART_BG); + _lv_style_list_add_style(list, &styles->bg); - int idx = 1; /* start value should be 1, not zero, since cell styles + int idx = 1; /* start value should be 1, not zero, since cell styles start at 1 due to presence of LV_TABLE_PART_BG=0 - in the enum (lv_table.h) */ - /* declaring idx outside loop to work with older compilers */ - for (;idx <= LV_TABLE_CELL_STYLE_CNT; idx ++ ) { - list = _lv_obj_get_style_list(obj, idx); - _lv_style_list_add_style(list, &styles->table_cell); + in the enum (lv_table.h) */ + /* declaring idx outside loop to work with older compilers */ + for(; idx <= LV_TABLE_CELL_STYLE_CNT; idx ++) { + list = _lv_obj_get_style_list(obj, idx); + _lv_style_list_add_style(list, &styles->table_cell); + } + break; } - break; - } #endif #if LV_USE_WIN diff --git a/src/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c index bbf828feb..df6309956 100644 --- a/src/lv_themes/lv_theme_mono.c +++ b/src/lv_themes/lv_theme_mono.c @@ -114,6 +114,8 @@ static void basic_init(void) lv_style_set_bg_opa(&styles->scr, LV_STATE_DEFAULT, LV_OPA_COVER); lv_style_set_bg_color(&styles->scr, LV_STATE_DEFAULT, BG_COLOR); lv_style_set_text_color(&styles->scr, LV_STATE_DEFAULT, FG_COLOR); + lv_style_set_text_sel_color(&styles->scr, LV_STATE_DEFAULT, BG_COLOR); + lv_style_set_text_sel_bg_color(&styles->scr, LV_STATE_DEFAULT, FG_COLOR); lv_style_set_value_color(&styles->scr, LV_STATE_DEFAULT, FG_COLOR); style_init_reset(&styles->bg); @@ -863,22 +865,21 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj, lv_theme_style_t name) break; #endif #if LV_USE_TABLE - case LV_THEME_TABLE: - { - list = _lv_obj_get_style_list(obj, LV_TABLE_PART_BG); - _lv_style_list_add_style(list, &styles->bg); + case LV_THEME_TABLE: { + list = _lv_obj_get_style_list(obj, LV_TABLE_PART_BG); + _lv_style_list_add_style(list, &styles->bg); - int idx = 1; /* start value should be 1, not zero, since cell styles + int idx = 1; /* start value should be 1, not zero, since cell styles start at 1 due to presence of LV_TABLE_PART_BG=0 in the enum (lv_table.h) */ - /* declaring idx outside loop to work with older compilers */ - for (; idx <= LV_TABLE_CELL_STYLE_CNT; idx ++ ) { - list = _lv_obj_get_style_list(obj, idx); - _lv_style_list_add_style(list, &styles->bg); - _lv_style_list_add_style(list, &styles->no_radius); + /* declaring idx outside loop to work with older compilers */ + for(; idx <= LV_TABLE_CELL_STYLE_CNT; idx ++) { + list = _lv_obj_get_style_list(obj, idx); + _lv_style_list_add_style(list, &styles->bg); + _lv_style_list_add_style(list, &styles->no_radius); + } + break; } - break; - } #endif #if LV_USE_WIN diff --git a/src/lv_themes/lv_theme_template.c b/src/lv_themes/lv_theme_template.c index 9040c99e3..61fd3f3f2 100644 --- a/src/lv_themes/lv_theme_template.c +++ b/src/lv_themes/lv_theme_template.c @@ -716,21 +716,20 @@ void theme_apply(lv_theme_t * th, lv_obj_t * obj, lv_theme_style_t name) break; #endif #if LV_USE_TABLE - case LV_THEME_TABLE: - { - list = _lv_obj_get_style_list(obj, LV_TABLE_PART_BG); - _lv_style_list_add_style(list, &styles->bg); + case LV_THEME_TABLE: { + list = _lv_obj_get_style_list(obj, LV_TABLE_PART_BG); + _lv_style_list_add_style(list, &styles->bg); - int idx = 1; /* start value should be 1, not zero, since cell styles + int idx = 1; /* start value should be 1, not zero, since cell styles start at 1 due to presence of LV_TABLE_PART_BG=0 in the enum (lv_table.h) */ - /* declaring idx outside loop to work with older compilers */ - for (; idx <= LV_TABLE_CELL_STYLE_CNT; idx ++ ) { - list = _lv_obj_get_style_list(obj, idx); - _lv_style_list_add_style(list, &styles->bg); + /* declaring idx outside loop to work with older compilers */ + for(; idx <= LV_TABLE_CELL_STYLE_CNT; idx ++) { + list = _lv_obj_get_style_list(obj, idx); + _lv_style_list_add_style(list, &styles->bg); + } + break; } - break; - } #endif #if LV_USE_WIN diff --git a/src/lv_widgets/lv_calendar.c b/src/lv_widgets/lv_calendar.c new file mode 100644 index 000000000..9aa6f3381 --- /dev/null +++ b/src/lv_widgets/lv_calendar.c @@ -0,0 +1,1091 @@ +/** + * @file lv_calendar.c + * + */ + +/********************* + * INCLUDES + *********************/ +#include "lv_calendar.h" +#if LV_USE_CALENDAR != 0 + +#include "../lv_misc/lv_debug.h" +#include "../lv_draw/lv_draw.h" +#include "../lv_hal/lv_hal_indev.h" +#include "../lv_misc/lv_utils.h" +#include "../lv_core/lv_indev.h" +#include "../lv_themes/lv_theme.h" +#include + +/********************* + * DEFINES + *********************/ +#define LV_OBJX_NAME "lv_calendar" + +/********************** + * TYPEDEFS + **********************/ +enum { + DAY_DRAW_PREV_MONTH, + DAY_DRAW_ACT_MONTH, + DAY_DRAW_NEXT_MONTH, +}; +typedef uint8_t day_draw_state_t; + +/********************** + * STATIC PROTOTYPES + **********************/ +static lv_design_res_t lv_calendar_design(lv_obj_t * calendar, const lv_area_t * clip_area, lv_design_mode_t mode); +static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * param); +static lv_style_list_t * lv_calendar_get_style(lv_obj_t * calendar, uint8_t part); +static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touched_point); +static lv_coord_t get_header_height(lv_obj_t * calendar); +static lv_coord_t get_day_names_height(lv_obj_t * calendar); +static void draw_header(lv_obj_t * calendar, const lv_area_t * mask); +static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask); +static void draw_dates(lv_obj_t * calendar, const lv_area_t * clip_area); +static uint8_t get_day_of_week(uint32_t year, uint32_t month, uint32_t day); +static bool is_highlighted(lv_obj_t * calendar, day_draw_state_t draw_state, int32_t year, int32_t month, int32_t day); +static bool is_pressed(lv_obj_t * calendar, day_draw_state_t draw_state, int32_t year, int32_t month, int32_t day); +static const char * get_day_name(lv_obj_t * calendar, uint8_t day); +static const char * get_month_name(lv_obj_t * calendar, int32_t month); +static uint8_t get_month_length(int32_t year, int32_t month); +static uint8_t is_leap_year(uint32_t year); + +/********************** + * STATIC VARIABLES + **********************/ +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_design; +#if LV_CALENDAR_WEEK_STARTS_MONDAY != 0 +static const char * day_name[7] = {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}; +#else +static const char * day_name[7] = {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}; +#endif +static const char * month_name[12] = {"January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" + }; + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/** + * Create a calendar object + * @param par pointer to an object, it will be the parent of the new calendar + * @param copy pointer to a calendar object, if not NULL then the new object will be copied from it + * @return pointer to the created calendar + */ +lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) +{ + LV_LOG_TRACE("calendar create started"); + + /*Create the ancestor of calendar*/ + lv_obj_t * calendar = lv_obj_create(par, copy); + LV_ASSERT_MEM(calendar); + if(calendar == NULL) return NULL; + + /*Allocate the calendar type specific extended data*/ + lv_calendar_ext_t * ext = lv_obj_allocate_ext_attr(calendar, sizeof(lv_calendar_ext_t)); + LV_ASSERT_MEM(ext); + if(ext == NULL) { + lv_obj_del(calendar); + return NULL; + } + + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(calendar); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(calendar); + + /*Initialize the allocated 'ext' */ + ext->today.year = 2020; + ext->today.month = 1; + ext->today.day = 1; + + ext->showed_date.year = 2020; + ext->showed_date.month = 1; + ext->showed_date.day = 1; + + ext->pressed_date.year = 0; + ext->pressed_date.month = 0; + ext->pressed_date.day = 0; + + ext->highlighted_dates = NULL; + ext->highlighted_dates_num = 0; + ext->day_names = NULL; + ext->month_names = NULL; + + ext->btn_pressing = 0; + + + lv_style_list_init(&ext->style_date_nums); + lv_style_list_init(&ext->style_day_names); + lv_style_list_init(&ext->style_header); + ext->style_date_nums.skip_trans = 1; + ext->style_day_names.skip_trans = 1; + ext->style_header.skip_trans = 1; + + /*The signal and design functions are not copied so set them here*/ + lv_obj_set_signal_cb(calendar, lv_calendar_signal); + lv_obj_set_design_cb(calendar, lv_calendar_design); + + /*Init the new calendar calendar*/ + if(copy == NULL) { + lv_theme_apply(calendar, LV_THEME_CALENDAR); + + lv_obj_set_size(calendar, 5 * LV_DPI / 2, 5 * LV_DPI / 2); + + } + /*Copy an existing calendar*/ + else { + lv_calendar_ext_t * copy_ext = lv_obj_get_ext_attr(copy); + ext->today.year = copy_ext->today.year; + ext->today.month = copy_ext->today.month; + ext->today.day = copy_ext->today.day; + + ext->showed_date.year = copy_ext->showed_date.year; + ext->showed_date.month = copy_ext->showed_date.month; + ext->showed_date.day = copy_ext->showed_date.day; + + ext->highlighted_dates = copy_ext->highlighted_dates; + ext->highlighted_dates_num = copy_ext->highlighted_dates_num; + ext->day_names = copy_ext->day_names; + + ext->month_names = copy_ext->month_names; + ext->style_header = copy_ext->style_header; + ext->style_day_names = copy_ext->style_day_names; + /*Refresh the style with new signal function*/ + // lv_obj_refresh_style(new_calendar); + } + + LV_LOG_INFO("calendar created"); + + return calendar; +} + +/*====================== + * Add/remove functions + *=====================*/ + +/* + * New object specific "add" or "remove" functions come here + */ + +/*===================== + * Setter functions + *====================*/ + +/** + * Set the today's date + * @param calendar pointer to a calendar object + * @param today pointer to an `lv_calendar_date_t` variable containing the date of today. The value + * will be saved it can be local variable too. + */ +void lv_calendar_set_today_date(lv_obj_t * calendar, lv_calendar_date_t * today) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + LV_ASSERT_NULL(today); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + ext->today.year = today->year; + ext->today.month = today->month; + ext->today.day = today->day; + + lv_obj_invalidate(calendar); +} + +/** + * Set the currently showed + * @param calendar pointer to a calendar object + * @param showed pointer to an `lv_calendar_date_t` variable containing the date to show. The value + * will be saved it can be local variable too. + */ +void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showed) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + LV_ASSERT_NULL(showed); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + ext->showed_date.year = showed->year; + ext->showed_date.month = showed->month; + ext->showed_date.day = showed->day; + + lv_obj_invalidate(calendar); +} + +/** + * Set the the highlighted dates + * @param calendar pointer to a calendar object + * @param highlighted pointer to an `lv_calendar_date_t` array containing the dates. ONLY A POINTER + * WILL BE SAVED! CAN'T BE LOCAL ARRAY. + * @param date_num number of dates in the array + */ +void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t highlighted[], uint16_t date_num) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + LV_ASSERT_NULL(highlighted); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + ext->highlighted_dates = highlighted; + ext->highlighted_dates_num = date_num; + + lv_obj_invalidate(calendar); +} + +/** + * Set the name of the days + * @param calendar pointer to a calendar object + * @param day_names pointer to an array with the names. E.g. `const char * days[7] = {"Sun", "Mon", + * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed + * later. + */ +void lv_calendar_set_day_names(lv_obj_t * calendar, const char ** day_names) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + LV_ASSERT_NULL(day_names); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + ext->day_names = day_names; + lv_obj_invalidate(calendar); +} + +/** + * Set the name of the month + * @param calendar pointer to a calendar object + * @param month_names pointer to an array with the names. E.g. `const char * days[12] = {"Jan", "Feb", + * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed + * later. + */ +void lv_calendar_set_month_names(lv_obj_t * calendar, const char ** month_names) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + LV_ASSERT_NULL(month_names); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + ext->month_names = month_names; + lv_obj_invalidate(calendar); +} + +/*===================== + * Getter functions + *====================*/ + +/** + * Get the today's date + * @param calendar pointer to a calendar object + * @return return pointer to an `lv_calendar_date_t` variable containing the date of today. + */ +lv_calendar_date_t * lv_calendar_get_today_date(const lv_obj_t * calendar) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + return &ext->today; +} + +/** + * Get the currently showed + * @param calendar pointer to a calendar object + * @return pointer to an `lv_calendar_date_t` variable containing the date is being shown. + */ +lv_calendar_date_t * lv_calendar_get_showed_date(const lv_obj_t * calendar) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + return &ext->showed_date; +} + +/** + * Get the the pressed date. + * @param calendar pointer to a calendar object + * @return pointer to an `lv_calendar_date_t` variable containing the pressed date. + * `NULL` if not date pressed (e.g. the header) + */ +lv_calendar_date_t * lv_calendar_get_pressed_date(const lv_obj_t * calendar) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + return ext->pressed_date.year != 0 ? &ext->pressed_date : NULL; +} + +/** + * Get the the highlighted dates + * @param calendar pointer to a calendar object + * @return pointer to an `lv_calendar_date_t` array containing the dates. + */ +lv_calendar_date_t * lv_calendar_get_highlighted_dates(const lv_obj_t * calendar) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + return ext->highlighted_dates; +} + +/** + * Get the number of the highlighted dates + * @param calendar pointer to a calendar object + * @return number of highlighted days + */ +uint16_t lv_calendar_get_highlighted_dates_num(const lv_obj_t * calendar) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + return ext->highlighted_dates_num; +} + +/** + * Get the name of the days + * @param calendar pointer to a calendar object + * @return pointer to the array of day names + */ +const char ** lv_calendar_get_day_names(const lv_obj_t * calendar) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + return ext->day_names; +} + +/** + * Get the name of the month + * @param calendar pointer to a calendar object + * @return pointer to the array of month names + */ +const char ** lv_calendar_get_month_names(const lv_obj_t * calendar) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + return ext->month_names; +} + +/*===================== + * Other functions + *====================*/ + +/* + * New object specific "other" functions come here + */ + +/********************** + * STATIC FUNCTIONS + **********************/ + +/** + * Handle the drawing related tasks of the calendars + * @param calendar pointer to an object + * @param clip_area the object will be drawn only in this area + * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area + * (return 'true' if yes) + * LV_DESIGN_DRAW: draw the object (always return 'true') + * LV_DESIGN_DRAW_POST: drawing after every children are drawn + * @param return an element of `lv_design_res_t` + */ +static lv_design_res_t lv_calendar_design(lv_obj_t * calendar, const lv_area_t * clip_area, lv_design_mode_t mode) +{ + /*Return false if the object is not covers the mask_p area*/ + if(mode == LV_DESIGN_COVER_CHK) { + return ancestor_design(calendar, clip_area, mode); + } + /*Draw the object*/ + else if(mode == LV_DESIGN_DRAW_MAIN) { + ancestor_design(calendar, clip_area, mode); + + draw_header(calendar, clip_area); + draw_day_names(calendar, clip_area); + draw_dates(calendar, clip_area); + + } + /*Post draw when the children are drawn*/ + else if(mode == LV_DESIGN_DRAW_POST) { + ancestor_design(calendar, clip_area, mode); + } + + return LV_DESIGN_RES_OK; +} + +/** + * Signal function of the calendar + * @param calendar pointer to a calendar object + * @param sign a signal type from lv_signal_t enum + * @param param pointer to a signal specific variable + * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted + */ +static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * param) +{ + lv_res_t res; + if(sign == LV_SIGNAL_GET_STYLE) { + lv_get_style_info_t * info = param; + info->result = lv_calendar_get_style(calendar, info->part); + if(info->result != NULL) return LV_RES_OK; + else return ancestor_signal(calendar, sign, param); + return LV_RES_OK; + } + + /* Include the ancient signal function */ + res = ancestor_signal(calendar, sign, param); + if(res != LV_RES_OK) return res; + if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME); + + if(sign == LV_SIGNAL_CLEANUP) { + lv_obj_clean_style_list(calendar, LV_CALENDAR_PART_HEADER); + lv_obj_clean_style_list(calendar, LV_CALENDAR_PART_DAY_NAMES); + lv_obj_clean_style_list(calendar, LV_CALENDAR_PART_DATE); + } + else if(sign == LV_SIGNAL_PRESSING) { + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + lv_area_t header_area; + lv_area_copy(&header_area, &calendar->coords); + header_area.y2 = header_area.y1 + get_header_height(calendar); + + lv_indev_t * indev = lv_indev_get_act(); + lv_point_t p; + lv_indev_get_point(indev, &p); + + /*If the header is pressed mark an arrow as pressed*/ + if(_lv_area_is_point_on(&header_area, &p, 0)) { + if(p.x < header_area.x1 + lv_area_get_width(&header_area) / 2) { + if(ext->btn_pressing != -1) lv_obj_invalidate(calendar); + ext->btn_pressing = -1; + } + else { + if(ext->btn_pressing != 1) lv_obj_invalidate(calendar); + ext->btn_pressing = 1; + } + + ext->pressed_date.year = 0; + ext->pressed_date.month = 0; + ext->pressed_date.day = 0; + } + /*If a day is pressed save it*/ + else if(calculate_touched_day(calendar, &p)) { + ext->btn_pressing = 0; + lv_obj_invalidate(calendar); + } + /*Else set a default state*/ + else { + if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); + ext->btn_pressing = 0; + ext->pressed_date.year = 0; + ext->pressed_date.month = 0; + ext->pressed_date.day = 0; + } + } + else if(sign == LV_SIGNAL_PRESS_LOST) { + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + ext->btn_pressing = 0; + ext->pressed_date.year = 0; + ext->pressed_date.month = 0; + ext->pressed_date.day = 0; + lv_obj_invalidate(calendar); + + } + else if(sign == LV_SIGNAL_RELEASED) { + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + if(ext->btn_pressing < 0) { + if(ext->showed_date.month <= 1) { + ext->showed_date.month = 12; + ext->showed_date.year--; + } + else { + ext->showed_date.month--; + } + } + else if(ext->btn_pressing > 0) { + if(ext->showed_date.month >= 12) { + ext->showed_date.month = 1; + ext->showed_date.year++; + } + else { + ext->showed_date.month++; + } + } + else if(ext->pressed_date.year != 0) { + res = lv_event_send(calendar, LV_EVENT_VALUE_CHANGED, NULL); + if(res != LV_RES_OK) return res; + + } + + ext->btn_pressing = 0; + ext->pressed_date.year = 0; + ext->pressed_date.month = 0; + ext->pressed_date.day = 0; + lv_obj_invalidate(calendar); + } + else if(sign == LV_SIGNAL_CONTROL) { +#if LV_USE_GROUP + uint8_t c = *((uint8_t *)param); + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + if(c == LV_KEY_RIGHT || c == LV_KEY_UP) { + if(ext->showed_date.month >= 12) { + ext->showed_date.month = 1; + ext->showed_date.year++; + } + else { + ext->showed_date.month++; + } + lv_obj_invalidate(calendar); + } + else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) { + if(ext->showed_date.month <= 1) { + ext->showed_date.month = 12; + ext->showed_date.year--; + } + else { + ext->showed_date.month--; + } + lv_obj_invalidate(calendar); + } +#endif + } + + return res; +} + +/** + * Get the style descriptor of a part of the object + * @param page pointer the object + * @param part the part from `lv_calendar_part_t`. (LV_CALENDAR_PART_...) + * @return pointer to the style descriptor of the specified part + */ +static lv_style_list_t * lv_calendar_get_style(lv_obj_t * calendar, uint8_t part) +{ + LV_ASSERT_OBJ(calendar, LV_OBJX_NAME); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + lv_style_list_t * style_dsc_p; + + + switch(part) { + case LV_CALENDAR_PART_BG: + style_dsc_p = &calendar->style_list; + break; + case LV_CALENDAR_PART_HEADER: + style_dsc_p = &ext->style_header; + break; + case LV_CALENDAR_PART_DAY_NAMES: + style_dsc_p = &ext->style_day_names; + break; + case LV_CALENDAR_PART_DATE: + style_dsc_p = &ext->style_date_nums; + break; + default: + style_dsc_p = NULL; + } + + return style_dsc_p; +} + +/** + * It will check if the days part of calendar is touched + * and if it is, it will calculate the day and put it in pressed_date of calendar object. + * @param calendar pointer to a calendar object + * @param pointer to a point + * @return true: days part of calendar is touched and its related date is put in pressed date + * false: the point is out of days part area. + */ +static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touched_point) +{ + lv_area_t days_area; + lv_area_copy(&days_area, &calendar->coords); + lv_style_int_t left = lv_obj_get_style_pad_left(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t right = lv_obj_get_style_pad_right(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t top = lv_obj_get_style_pad_top(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t bottom = lv_obj_get_style_pad_bottom(calendar, LV_CALENDAR_PART_DATE); + + days_area.x1 += left; + days_area.x2 -= right; + days_area.y1 = calendar->coords.y1 + get_header_height(calendar) + get_day_names_height(calendar) + top; + days_area.y2 -= bottom; + + if(_lv_area_is_point_on(&days_area, touched_point, 0)) { + lv_coord_t w = (days_area.x2 - days_area.x1 + 1) / 7; + lv_coord_t h = (days_area.y2 - days_area.y1 + 1) / 6; + uint8_t x_pos = 0; + x_pos = (touched_point->x - days_area.x1) / w; + if(x_pos > 6) x_pos = 6; + uint8_t y_pos = 0; + y_pos = (touched_point->y - days_area.y1) / h; + if(y_pos > 5) y_pos = 5; + + uint8_t i_pos = 0; + i_pos = (y_pos * 7) + x_pos; + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + if(i_pos < get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1)) { + ext->pressed_date.year = ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0); + ext->pressed_date.month = ext->showed_date.month == 1 ? 12 : (ext->showed_date.month - 1); + ext->pressed_date.day = get_month_length(ext->pressed_date.year, ext->pressed_date.month) - + get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + 1 + i_pos; + } + else if(i_pos < (get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + + get_month_length(ext->showed_date.year, ext->showed_date.month))) { + ext->pressed_date.year = ext->showed_date.year; + ext->pressed_date.month = ext->showed_date.month; + ext->pressed_date.day = i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1); + } + else if(i_pos < 42) { + ext->pressed_date.year = ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0); + ext->pressed_date.month = ext->showed_date.month == 12 ? 1 : (ext->showed_date.month + 1); + ext->pressed_date.day = i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) - + get_month_length(ext->showed_date.year, ext->showed_date.month); + } + return true; + } + else { + return false; + } +} + +/** + * Get the height of a calendar's header based on it's style + * @param calendar point to a calendar + * @return the header's height + */ +static lv_coord_t get_header_height(lv_obj_t * calendar) +{ + const lv_font_t * font = lv_obj_get_style_text_font(calendar, LV_CALENDAR_PART_HEADER); + lv_style_int_t top = lv_obj_get_style_margin_top(calendar, LV_CALENDAR_PART_HEADER) + + lv_obj_get_style_pad_top(calendar, LV_CALENDAR_PART_HEADER); + lv_style_int_t bottom = lv_obj_get_style_margin_bottom(calendar, LV_CALENDAR_PART_HEADER) + + lv_obj_get_style_pad_bottom(calendar, LV_CALENDAR_PART_HEADER); + + return lv_font_get_line_height(font) + top + bottom; +} + +/** + * Get the height of a calendar's day_names based on it's style + * @param calendar point to a calendar + * @return the day_names's height + */ +static lv_coord_t get_day_names_height(lv_obj_t * calendar) +{ + const lv_font_t * font = lv_obj_get_style_text_font(calendar, LV_CALENDAR_PART_DAY_NAMES); + lv_style_int_t top = lv_obj_get_style_pad_top(calendar, LV_CALENDAR_PART_DAY_NAMES); + lv_style_int_t bottom = lv_obj_get_style_pad_bottom(calendar, LV_CALENDAR_PART_DAY_NAMES); + + return lv_font_get_line_height(font) + top + bottom; +} + +/** + * Draw the calendar header with month name and arrows + * @param calendar point to a calendar + * @param mask a mask for drawing + */ +static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) +{ + lv_style_int_t header_left = lv_obj_get_style_pad_left(calendar, LV_CALENDAR_PART_HEADER); + lv_style_int_t header_right = lv_obj_get_style_pad_right(calendar, LV_CALENDAR_PART_HEADER); + const lv_font_t * font = lv_obj_get_style_text_font(calendar, LV_CALENDAR_PART_HEADER); + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + + lv_area_t header_area; + header_area.x1 = calendar->coords.x1; + header_area.x2 = calendar->coords.x2; + header_area.y1 = calendar->coords.y1 + lv_obj_get_style_margin_top(calendar, LV_CALENDAR_PART_HEADER); + header_area.y2 = header_area.y1 + lv_obj_get_style_pad_top(calendar, LV_CALENDAR_PART_HEADER) + + lv_font_get_line_height(font) + lv_obj_get_style_pad_bottom(calendar, LV_CALENDAR_PART_HEADER); + + lv_draw_rect_dsc_t header_rect_dsc; + lv_draw_rect_dsc_init(&header_rect_dsc); + lv_obj_init_draw_rect_dsc(calendar, LV_CALENDAR_PART_HEADER, &header_rect_dsc); + lv_draw_rect(&header_area, mask, &header_rect_dsc); + + lv_state_t state_ori = calendar->state; + + /*Add the year + month name*/ + char txt_buf[64]; + _lv_utils_num_to_str(ext->showed_date.year, txt_buf); + txt_buf[4] = ' '; + txt_buf[5] = '\0'; + strcpy(&txt_buf[5], get_month_name(calendar, ext->showed_date.month)); + + calendar->state = LV_STATE_DEFAULT; + _lv_obj_disable_style_caching(calendar, true); + + lv_draw_label_dsc_t label_dsc; + lv_draw_label_dsc_init(&label_dsc); + lv_obj_init_draw_label_dsc(calendar, LV_CALENDAR_PART_HEADER, &label_dsc); + label_dsc.flag = LV_TXT_FLAG_CENTER; + header_area.y1 += lv_obj_get_style_pad_top(calendar, LV_CALENDAR_PART_HEADER); + header_area.y2 -= lv_obj_get_style_pad_bottom(calendar, LV_CALENDAR_PART_HEADER); + lv_draw_label(&header_area, mask, &label_dsc, txt_buf, NULL); + + calendar->state = state_ori; /*Restore the state*/ + + /*Add the left arrow*/ + if(ext->btn_pressing < 0) calendar->state |= LV_STATE_PRESSED; + else calendar->state &= ~(LV_STATE_PRESSED); + + header_area.x1 += header_left; + + lv_draw_label_dsc_init(&label_dsc); + lv_obj_init_draw_label_dsc(calendar, LV_CALENDAR_PART_HEADER, &label_dsc); + lv_draw_label(&header_area, mask, &label_dsc, LV_SYMBOL_LEFT, NULL); + + calendar->state = state_ori; /*Restore the state*/ + + /*Add the right arrow*/ + if(ext->btn_pressing > 0) calendar->state |= LV_STATE_PRESSED; + else calendar->state &= ~(LV_STATE_PRESSED); + + header_area.x1 = header_area.x2 - header_right - _lv_txt_get_width(LV_SYMBOL_RIGHT, (uint16_t)strlen(LV_SYMBOL_RIGHT), + font, 0, LV_TXT_FLAG_NONE); + + lv_draw_label_dsc_init(&label_dsc); + lv_obj_init_draw_label_dsc(calendar, LV_CALENDAR_PART_HEADER, &label_dsc); + lv_draw_label(&header_area, mask, &label_dsc, LV_SYMBOL_RIGHT, NULL); + + calendar->state = state_ori; /*Restore the state*/ + _lv_obj_disable_style_caching(calendar, false); +} + +/** + * Draw the day's name below the header + * @param calendar point to a calendar + * @param mask a mask for drawing + */ +static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) +{ + lv_style_int_t date_top = lv_obj_get_style_pad_top(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t date_bottom = lv_obj_get_style_pad_bottom(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t date_left = lv_obj_get_style_pad_left(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t date_right = lv_obj_get_style_pad_right(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t date_inner = lv_obj_get_style_pad_inner(calendar, LV_CALENDAR_PART_DATE); + + lv_coord_t days_w = lv_obj_get_width(calendar) - date_left - date_right; + lv_coord_t box_w = (days_w - date_inner * 6) / 7; + lv_coord_t days_y1 = calendar->coords.y1 + date_top + get_header_height(calendar) + get_day_names_height(calendar); + lv_coord_t days_h = calendar->coords.y2 - days_y1 - date_bottom; + lv_coord_t box_h = (days_h - 5 * date_inner) / 6; + lv_coord_t box_size = LV_MATH_MIN(box_w, box_h); + + lv_style_int_t left = lv_obj_get_style_pad_left(calendar, LV_CALENDAR_PART_DAY_NAMES); + lv_style_int_t right = lv_obj_get_style_pad_right(calendar, LV_CALENDAR_PART_DAY_NAMES); + lv_style_int_t top = lv_obj_get_style_pad_top(calendar, LV_CALENDAR_PART_DAY_NAMES); + const lv_font_t * font = lv_obj_get_style_text_font(calendar, LV_CALENDAR_PART_DAY_NAMES); + + lv_coord_t w = lv_obj_get_width(calendar) - left - right; + + lv_coord_t label_w = w / 6; + + lv_area_t label_area; + label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + top; + label_area.y2 = label_area.y1 + lv_font_get_line_height(font); + + lv_draw_label_dsc_t label_dsc; + lv_draw_label_dsc_init(&label_dsc); + lv_obj_init_draw_label_dsc(calendar, LV_CALENDAR_PART_DAY_NAMES, &label_dsc); + label_dsc.flag = LV_TXT_FLAG_CENTER; + + uint32_t i; + for(i = 0; i < 7; i++) { + label_area.x1 = calendar->coords.x1 + ((w - box_size) * i) / 6 + box_size / 2 - label_w / 2 + left; + label_area.x2 = label_area.x1 + label_w - 1; + + lv_draw_label(&label_area, mask, &label_dsc, get_day_name(calendar, i), NULL); + } +} + +/** + * Draw the date numbers in a matrix + * @param calendar point to a calendar + * @param mask a mask for drawing + */ +static void draw_dates(lv_obj_t * calendar, const lv_area_t * clip_area) +{ + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + + const lv_font_t * nums_font = lv_obj_get_style_text_font(calendar, LV_CALENDAR_PART_DATE); + + lv_style_int_t date_top = lv_obj_get_style_pad_top(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t date_bottom = lv_obj_get_style_pad_bottom(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t date_left = lv_obj_get_style_pad_left(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t date_right = lv_obj_get_style_pad_right(calendar, LV_CALENDAR_PART_DATE); + lv_style_int_t date_inner = lv_obj_get_style_pad_inner(calendar, LV_CALENDAR_PART_DATE); + + lv_coord_t days_y1 = calendar->coords.y1 + date_top + get_header_height(calendar) + get_day_names_height(calendar); + lv_coord_t days_h = calendar->coords.y2 - days_y1 - date_bottom; + + /*The state changes without re-caching the styles, disable the use of cache*/ + lv_state_t state_ori = calendar->state; + calendar->state = LV_STATE_DEFAULT; + _lv_obj_disable_style_caching(calendar, true); + + lv_state_t month_state = LV_STATE_DISABLED; + + uint8_t day_cnt; + lv_coord_t days_w = lv_obj_get_width(calendar) - date_left - date_right; + lv_coord_t box_w = (days_w - date_inner * 6) / 7; + lv_coord_t box_h = (days_h - 5 * date_inner) / 6; + lv_coord_t box_size = LV_MATH_MIN(box_w, box_h); + + uint8_t month_start_day = get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1); + + day_draw_state_t draw_state; + + /*If starting with the first day of the week then the previous month is not visible*/ + if(month_start_day == 0) { + day_cnt = 1; + draw_state = DAY_DRAW_ACT_MONTH; + month_state = 0; + } + else { + draw_state = DAY_DRAW_PREV_MONTH; + day_cnt = get_month_length(ext->showed_date.year, ext->showed_date.month - 1); /*Length of the previous month*/ + day_cnt -= month_start_day - 1; /*First visible number of the previous month*/ + month_state = LV_STATE_DISABLED; + } + + bool month_of_today_shown = false; + if(ext->showed_date.year == ext->today.year && ext->showed_date.month == ext->today.month) { + month_of_today_shown = true; + } + + char buf[3]; + + /*Draw 6 weeks*/ + lv_draw_rect_dsc_t rect_dsc; + lv_draw_label_dsc_t label_dsc; + lv_state_t prev_state = 0xFF; + uint32_t week; + for(week = 0; week < 6; week++) { + lv_area_t box_area; + + box_area.y1 = days_y1 + ((days_h - box_size) * week) / 5; + box_area.y2 = box_area.y1 + box_size - 1; + + if(box_area.y1 > clip_area->y2) { + calendar->state = state_ori; + _lv_obj_disable_style_caching(calendar, false); + return; + } + + lv_area_t label_area; + label_area.y1 = box_area.y1 + (lv_area_get_height(&box_area) - lv_font_get_line_height(nums_font)) / 2; + label_area.y2 = label_area.y1 + lv_font_get_line_height(nums_font); + + /*Draw the 7 days of a week*/ + uint32_t day; + for(day = 0; day < 7; day++) { + /*The previous month is over*/ + if(draw_state == DAY_DRAW_PREV_MONTH && day == month_start_day) { + draw_state = DAY_DRAW_ACT_MONTH; + day_cnt = 1; + month_state = 0; + } + /*The current month is over*/ + else if(draw_state == DAY_DRAW_ACT_MONTH && + day_cnt > get_month_length(ext->showed_date.year, ext->showed_date.month)) { + draw_state = DAY_DRAW_NEXT_MONTH; + day_cnt = 1; + month_state = LV_STATE_DISABLED; + } + + if(box_area.y2 < clip_area->y1) { + day_cnt++; + continue; + } + + lv_state_t day_state = month_state; + if(is_pressed(calendar, draw_state, ext->showed_date.year, ext->showed_date.month, day_cnt)) { + day_state |= LV_STATE_PRESSED; + } + if(is_highlighted(calendar, draw_state, ext->showed_date.year, ext->showed_date.month, day_cnt)) { + day_state |= LV_STATE_CHECKED; + } + if(month_of_today_shown && day_cnt == ext->today.day && draw_state == DAY_DRAW_ACT_MONTH) { + day_state |= LV_STATE_FOCUSED; + } + + if(prev_state != day_state) { + lv_draw_rect_dsc_init(&rect_dsc); + lv_draw_label_dsc_init(&label_dsc); + label_dsc.flag = LV_TXT_FLAG_CENTER; + + calendar->state = day_state; + lv_obj_init_draw_label_dsc(calendar, LV_CALENDAR_PART_DATE, &label_dsc); + lv_obj_init_draw_rect_dsc(calendar, LV_CALENDAR_PART_DATE, &rect_dsc); + + prev_state = day_state; + } + + label_area.x1 = calendar->coords.x1 + ((days_w - box_size) * day) / 6 + date_left; + label_area.x2 = label_area.x1 + box_size - 1; + + box_area.x1 = label_area.x1; + box_area.x2 = label_area.x2; + + + lv_draw_rect(&box_area, clip_area, &rect_dsc); + + /*Write the day's number*/ + _lv_utils_num_to_str(day_cnt, buf); + lv_draw_label(&label_area, clip_area, &label_dsc, buf, NULL); + + /*Go to the next day*/ + day_cnt++; + } + } + calendar->state = state_ori; + _lv_obj_disable_style_caching(calendar, false); + + +} + +/** + * Check weather a date is highlighted or not + * @param calendar pointer to a calendar object + * @param draw_state which month is drawn (previous, active, next) + * @param year a year + * @param month a month [1..12] + * @param day a day [1..31] + * @return true: highlighted + */ +static bool is_highlighted(lv_obj_t * calendar, day_draw_state_t draw_state, int32_t year, int32_t month, int32_t day) +{ + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + + + if(draw_state == DAY_DRAW_PREV_MONTH) { + year -= month == 1 ? 1 : 0; + month = month == 1 ? 12 : month - 1; + } + else if(draw_state == DAY_DRAW_NEXT_MONTH) { + year += month == 12 ? 1 : 0; + month = month == 12 ? 1 : month + 1; + } + + uint32_t i; + for(i = 0; i < ext->highlighted_dates_num; i++) { + if(ext->highlighted_dates[i].year == year && ext->highlighted_dates[i].month == month && + ext->highlighted_dates[i].day == day) { + return true; + } + } + + return false; +} + +/** + * Check weather a date is highlighted or not + * @param calendar pointer to a calendar object + * @param draw_state which month is drawn (previous, active, next) + * @param year a year + * @param month a month [1..12] + * @param day a day [1..31] + * @return true: highlighted + */ +static bool is_pressed(lv_obj_t * calendar, day_draw_state_t draw_state, int32_t year, int32_t month, int32_t day) +{ + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + + + if(draw_state == DAY_DRAW_PREV_MONTH) { + year -= month == 1 ? 1 : 0; + month = month == 1 ? 12 : month - 1; + } + else if(draw_state == DAY_DRAW_NEXT_MONTH) { + year += month == 12 ? 1 : 0; + month = month == 12 ? 1 : month + 1; + } + + if(year == ext->pressed_date.year && month == ext->pressed_date.month && day == ext->pressed_date.day) return true; + else return false; +} +/** + * Get the day name + * @param calendar pointer to a calendar object + * @param day a day in [0..6] + * @return + */ +static const char * get_day_name(lv_obj_t * calendar, uint8_t day) +{ + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + if(ext->day_names) + return ext->day_names[day]; + else + return day_name[day]; +} + +/** + * Get the month name + * @param calendar pointer to a calendar object + * @param month a month. The range is basically [1..12] but [-11..1] is also supported to handle + * previous year + * @return + */ +static const char * get_month_name(lv_obj_t * calendar, int32_t month) +{ + month--; /*Range of months id [1..12] but range of indexes is [0..11]*/ + if(month < 0) month = 12 + month; + + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + if(ext->month_names) + return ext->month_names[month]; + else + return month_name[month]; +} + +/** + * Get the number of days in a month + * @param year a year + * @param month a month. The range is basically [1..12] but [-11..1] is also supported to handle + * previous year + * @return [28..31] + */ +static uint8_t get_month_length(int32_t year, int32_t month) +{ + month--; /*Range of months id [1..12] but range of indexes is [0..11]*/ + if(month < 0) { + year--; /*Already in the previous year (won't be less then -12 to skip a whole year)*/ + month = 12 + month; /*`month` is negative, the result will be < 12*/ + } + if(month >= 12) { + year++; + month -= 12; + } + + /*month == 1 is february*/ + return (month == 1) ? (28 + is_leap_year(year)) : 31 - month % 7 % 2; +} + +/** + * Tells whether a year is leap year or not + * @param year a year + * @return 0: not leap year; 1: leap year + */ +static uint8_t is_leap_year(uint32_t year) +{ + return (year % 4) || ((year % 100 == 0) && (year % 400)) ? 0 : 1; +} + +/** + * Get the day of the week + * @param year a year + * @param month a month + * @param day a day + * @return [0..6] which means [Sun..Sat] or [Mon..Sun] depending on LV_CALENDAR_WEEK_STARTS_MONDAY + */ +static uint8_t get_day_of_week(uint32_t year, uint32_t month, uint32_t day) +{ + uint32_t a = month < 3 ? 1 : 0; + uint32_t b = year - a; + +#if LV_CALENDAR_WEEK_STARTS_MONDAY + uint32_t day_of_week = (day + (31 * (month - 2 + 12 * a) / 12) + b + (b / 4) - (b / 100) + (b / 400) - 1) % 7; +#else + uint32_t day_of_week = (day + (31 * (month - 2 + 12 * a) / 12) + b + (b / 4) - (b / 100) + (b / 400)) % 7; +#endif + + return day_of_week; +} + +#endif diff --git a/src/lv_widgets/lv_chart.c b/src/lv_widgets/lv_chart.c index d760510ea..481f15b93 100644 --- a/src/lv_widgets/lv_chart.c +++ b/src/lv_widgets/lv_chart.c @@ -51,10 +51,10 @@ static lv_style_list_t * lv_chart_get_style(lv_obj_t * chart, uint8_t part); static void draw_series_bg(lv_obj_t * chart, const lv_area_t * series_area, const lv_area_t * mask); static void draw_series_line(lv_obj_t * chart, const lv_area_t * series_area, const lv_area_t * clip_area); static void draw_series_column(lv_obj_t * chart, const lv_area_t * series_area, const lv_area_t * clip_area); +static void draw_cursors(lv_obj_t * chart, const lv_area_t * series_area, const lv_area_t * clip_area); static void draw_axes(lv_obj_t * chart, const lv_area_t * series_area, const lv_area_t * mask); static void invalidate_lines(lv_obj_t * chart, uint16_t i); static void invalidate_columns(lv_obj_t * chart, uint16_t i); -static void get_series_area(lv_obj_t * chart, lv_area_t * series_area); static void get_next_axis_label(lv_chart_label_iterator_t * iterator, char * buf); static inline bool is_tick_with_label(uint8_t tick_num, lv_chart_axis_cfg_t * axis); static lv_chart_label_iterator_t create_axis_label_iter(const char * list, uint8_t iterator_dir); @@ -98,6 +98,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) } _lv_ll_init(&ext->series_ll, sizeof(lv_chart_series_t)); + _lv_ll_init(&ext->cursors_ll, sizeof(lv_chart_cursor_t)); uint8_t i; for(i = 0; i < _LV_CHART_AXIS_LAST; i++) { @@ -122,6 +123,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) lv_style_list_init(&ext->style_series_bg); lv_style_list_init(&ext->style_series); + lv_style_list_init(&ext->style_cursors); if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(chart); if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(chart); @@ -140,6 +142,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) lv_style_list_copy(&ext->style_series, &ext_copy->style_series); lv_style_list_copy(&ext->style_series_bg, &ext_copy->style_series_bg); + lv_style_list_copy(&ext->style_cursors, &ext_copy->style_cursors); ext->type = ext_copy->type; ext->hdiv_cnt = ext_copy->hdiv_cnt; @@ -204,6 +207,23 @@ lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color) return ser; } +lv_chart_cursor_t * lv_chart_add_cursor(lv_obj_t * chart, lv_color_t color, lv_cursor_direction_t axes) +{ + LV_ASSERT_OBJ(chart, LV_OBJX_NAME); + + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + lv_chart_cursor_t * cursor = _lv_ll_ins_head(&ext->cursors_ll); + LV_ASSERT_MEM(cursor); + if(cursor == NULL) return NULL; + + cursor->point.x = 0U; + cursor->point.y = LV_CHART_POINT_DEF; + cursor->color = color; + cursor->axes = axes; + + return cursor; +} + /** * Clear the point of a series * @param chart pointer to a chart object @@ -629,6 +649,23 @@ void lv_chart_set_series_axis(lv_obj_t * chart, lv_chart_series_t * ser, lv_char lv_chart_refresh(chart); } +/** + * Set the coordinate of the cursor with respect + * to the origin of series area of the chart. + * @param chart pointer to a chart object. + * @param cursor pointer to the cursor. + * @param point the new coordinate of cursor relative to the series area + */ +void lv_chart_set_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_point_t * point) +{ + LV_ASSERT_NULL(cursor); + LV_UNUSED(chart); + + cursor->point.x = point->x; + cursor->point.y = point->y; + lv_chart_refresh(chart); +} + /*===================== * Getter functions *====================*/ @@ -702,6 +739,138 @@ lv_chart_axis_t lv_chart_get_series_axis(lv_obj_t * chart, lv_chart_series_t * s return ser->y_axis; } + +/** + * Get the coordinate of the cursor with respect + * to the origin of series area of the chart. + * @param chart pointer to a chart object + * @param cursor pointer to cursor + * @return coordinate of the cursor as lv_point_t + */ +lv_point_t lv_chart_get_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor) +{ + LV_ASSERT_NULL(cursor); + LV_UNUSED(chart); + + return cursor->point; +} + +/** + * Get the nearest index to an X coordinate + * @param chart pointer to a chart object + * @param coord the coordination of the point relative to the series area. + * @return the found index + */ +uint16_t lv_chart_get_nearest_index_from_coord(lv_obj_t * chart, lv_coord_t x) +{ + lv_area_t series_area; + lv_chart_get_series_area(chart, &series_area); + + lv_coord_t w = lv_area_get_width(&series_area); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + if(x < 0) return 0; + if(x > w) return ext->point_cnt - 1; + if(ext->type == LV_CHART_TYPE_LINE) return (x * (ext->point_cnt - 1) + w / 2) / w; + if(ext->type == LV_CHART_TYPE_COLUMN) return (x * ext->point_cnt) / w; + + return 0; +} + +/** + * Get the x coordinate of the an index with respect + * to the origin of series area of the chart. + * @param chart pointer to a chart object + * @param ser pointer to series + * @param id the index. + * @return x coordinate of index + */ +lv_coord_t lv_chart_get_x_from_index(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t id) +{ + LV_ASSERT_NULL(chart); + LV_ASSERT_NULL(ser); + + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + if(id >= ext->point_cnt) { + LV_LOG_WARN("Invalid index: %d", id); + return 0; + } + + lv_area_t series_area; + lv_chart_get_series_area(chart, &series_area); + + lv_coord_t w = lv_area_get_width(&series_area); + + lv_coord_t x = 0; + + + if(ext->type & LV_CHART_TYPE_LINE) { + x = (w * id) / (ext->point_cnt - 1); + } + else if(ext->type & LV_CHART_TYPE_COLUMN) { + lv_coord_t col_w = w / ((_lv_ll_get_len(&ext->series_ll) + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/ + lv_chart_series_t * itr_ser = NULL; + lv_style_int_t col_space = lv_obj_get_style_pad_inner(chart, LV_CHART_PART_SERIES); + + x = (int32_t)((int32_t)w * id) / ext->point_cnt; + x += col_w / 2; /*Start offset*/ + + _LV_LL_READ_BACK(ext->series_ll, itr_ser) { + if(itr_ser == ser) break; + x += col_w; + } + + x += (col_w - col_space) / 2; + } + + return x; +} + +/** + * Get the y coordinate of the an index with respect + * to the origin of series area of the chart. + * @param chart pointer to a chart object + * @param ser pointer to series + * @param id the index. + * @return y coordinate of index + */ +lv_coord_t lv_chart_get_y_from_index(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t id) +{ + LV_ASSERT_NULL(chart); + LV_ASSERT_NULL(ser); + + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + if(id >= ext->point_cnt) { + LV_LOG_WARN("Invalid index: %d", id); + return 0; + } + + lv_area_t series_area; + lv_chart_get_series_area(chart, &series_area); + + lv_coord_t h = lv_area_get_height(&series_area); + + int32_t y = (int32_t)((int32_t)ser->points[id] - ext->ymin[ser->y_axis]) * h; + y = y / (ext->ymax[ser->y_axis] - ext->ymin[ser->y_axis]); + y = h - y; + + return (lv_coord_t)y; +} + +/** + * Get the series area of a chart. + * @param chart pointer to a chart object + * @param series_area pointer to an area variable that the result will be put in. + */ +void lv_chart_get_series_area(lv_obj_t * chart, lv_area_t * series_area) +{ + lv_area_copy(series_area, &chart->coords); + series_area->x1 += lv_obj_get_style_pad_left(chart, LV_CHART_PART_BG); + series_area->x2 -= lv_obj_get_style_pad_right(chart, LV_CHART_PART_BG); + series_area->y1 += lv_obj_get_style_pad_top(chart, LV_CHART_PART_BG); + series_area->y2 -= lv_obj_get_style_pad_bottom(chart, LV_CHART_PART_BG); +} + /*===================== * Other functions *====================*/ @@ -744,7 +913,7 @@ static lv_design_res_t lv_chart_design(lv_obj_t * chart, const lv_area_t * clip_ lv_draw_rect(&chart->coords, clip_area, &bg_dsc); lv_area_t series_area; - get_series_area(chart, &series_area); + lv_chart_get_series_area(chart, &series_area); draw_series_bg(chart, &series_area, clip_area); draw_axes(chart, &series_area, clip_area); @@ -753,6 +922,7 @@ static lv_design_res_t lv_chart_design(lv_obj_t * chart, const lv_area_t * clip_ lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); if(ext->type & LV_CHART_TYPE_LINE) draw_series_line(chart, &series_area, clip_area); if(ext->type & LV_CHART_TYPE_COLUMN) draw_series_column(chart, &series_area, clip_area); + draw_cursors(chart, &series_area, clip_area); } return LV_DESIGN_RES_OK; @@ -794,6 +964,7 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param _lv_ll_clear(&ext->series_ll); lv_obj_clean_style_list(chart, LV_CHART_PART_SERIES); + lv_obj_clean_style_list(chart, LV_CHART_PART_CURSOR); lv_obj_clean_style_list(chart, LV_CHART_PART_SERIES_BG); } @@ -824,6 +995,9 @@ static lv_style_list_t * lv_chart_get_style(lv_obj_t * chart, uint8_t part) case LV_CHART_PART_SERIES: style_dsc_p = &ext->style_series; break; + case LV_CHART_PART_CURSOR: + style_dsc_p = &ext->style_cursors; + break; default: style_dsc_p = NULL; } @@ -1120,6 +1294,94 @@ static void draw_series_column(lv_obj_t * chart, const lv_area_t * series_area, } } +/** + * Draw the cursors as lines on a chart + * @param chart pointer to chart object + * @param clip_area the object will be drawn only in this area + */ +static void draw_cursors(lv_obj_t * chart, const lv_area_t * series_area, const lv_area_t * clip_area) +{ + lv_area_t series_mask; + bool mask_ret = _lv_area_intersect(&series_mask, series_area, clip_area); + if(mask_ret == false) return; + + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + if(_lv_ll_is_empty(&ext->cursors_ll)) return; + + lv_point_t p1; + lv_point_t p2; + lv_chart_cursor_t * cursor; + + lv_draw_line_dsc_t line_dsc; + lv_draw_line_dsc_init(&line_dsc); + lv_obj_init_draw_line_dsc(chart, LV_CHART_PART_CURSOR, &line_dsc); + + lv_draw_rect_dsc_t point_dsc; + lv_draw_rect_dsc_init(&point_dsc); + point_dsc.bg_opa = line_dsc.opa; + point_dsc.radius = LV_RADIUS_CIRCLE; + + lv_coord_t point_radius = lv_obj_get_style_size(chart, LV_CHART_PART_CURSOR); + + /*Do not bother with line ending is the point will over it*/ + if(point_radius > line_dsc.width / 2) line_dsc.raw_end = 1; + + /*Go through all cursor lines*/ + _LV_LL_READ_BACK(ext->cursors_ll, cursor) { + line_dsc.color = cursor->color; + point_dsc.bg_color = cursor->color; + + if(cursor->axes & LV_CHART_CURSOR_RIGHT) { + p1.x = series_area->x1 + cursor->point.x; + p1.y = series_area->y1 + cursor->point.y; + p2.x = series_area->x2; + p2.y = p1.y; + lv_draw_line(&p1, &p2, &series_mask, &line_dsc); + } + + if(cursor->axes & LV_CHART_CURSOR_UP) { + + p1.x = series_area->x1 + cursor->point.x; + p1.y = series_area->y1; + p2.x = p1.x; + p2.y = series_area->y1 + cursor->point.y; + lv_draw_line(&p1, &p2, &series_mask, &line_dsc); + } + + if(cursor->axes & LV_CHART_CURSOR_LEFT) { + p1.x = series_area->x1; + p1.y = series_area->y1 + cursor->point.y; + p2.x = p1.x + cursor->point.x; + p2.y = p1.y; + lv_draw_line(&p1, &p2, &series_mask, &line_dsc); + } + + if(cursor->axes & LV_CHART_CURSOR_DOWN) { + + p1.x = series_area->x1 + cursor->point.x; + p1.y = series_area->y1 + cursor->point.y; + p2.x = p1.x; + p2.y = series_area->y2; + lv_draw_line(&p1, &p2, &series_mask, &line_dsc); + } + + if(point_radius) { + lv_area_t point_area; + + point_area.x1 = series_area->x1 + cursor->point.x - point_radius; + point_area.x2 = series_area->x1 + cursor->point.x + point_radius; + + point_area.y1 = series_area->y1 + cursor->point.y - point_radius; + point_area.y2 = series_area->y1 + cursor->point.y + point_radius; + + /*Don't limit to `series_mask` to get full circles on the ends*/ + lv_draw_rect(&point_area, clip_area, &point_dsc); + } + + } + +} + /** * Create iterator for newline-separated list * @param list pointer to newline-separated labels list @@ -1359,7 +1621,9 @@ static void draw_y_ticks(lv_obj_t * chart, const lv_area_t * series_area, const /* set the area at some distance of the major tick len left of the tick */ /* changed to explicit member initialization to allow compilation as c++ */ - lv_area_t a; a.y1 = p2.y - size.y / 2; a.y2 = p2.y + size.y / 2; + lv_area_t a; + a.y1 = p2.y - size.y / 2; + a.y2 = p2.y + size.y / 2; if(which_axis == LV_CHART_AXIS_PRIMARY_Y) { a.x1 = p2.x - size.x - label_dist; @@ -1498,7 +1762,7 @@ static void invalidate_lines(lv_obj_t * chart, uint16_t i) if(i >= ext->point_cnt) return; lv_area_t series_area; - get_series_area(chart, &series_area); + lv_chart_get_series_area(chart, &series_area); lv_coord_t w = lv_area_get_width(&series_area); lv_coord_t x_ofs = series_area.x1; @@ -1535,7 +1799,7 @@ static void invalidate_columns(lv_obj_t * chart, uint16_t i) lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); lv_area_t series_area; - get_series_area(chart, &series_area); + lv_chart_get_series_area(chart, &series_area); lv_area_t col_a; lv_coord_t w = lv_area_get_width(&series_area); @@ -1553,13 +1817,4 @@ static void invalidate_columns(lv_obj_t * chart, uint16_t i) _lv_inv_area(lv_obj_get_disp(chart), &col_a); } -static void get_series_area(lv_obj_t * chart, lv_area_t * series_area) -{ - lv_area_copy(series_area, &chart->coords); - series_area->x1 += lv_obj_get_style_pad_left(chart, LV_CHART_PART_BG); - series_area->x2 -= lv_obj_get_style_pad_right(chart, LV_CHART_PART_BG); - series_area->y1 += lv_obj_get_style_pad_top(chart, LV_CHART_PART_BG); - series_area->y2 -= lv_obj_get_style_pad_bottom(chart, LV_CHART_PART_BG); -} - #endif diff --git a/src/lv_widgets/lv_chart.h b/src/lv_widgets/lv_chart.h index 6f3deed8d..797edc378 100644 --- a/src/lv_widgets/lv_chart.h +++ b/src/lv_widgets/lv_chart.h @@ -61,6 +61,15 @@ enum { }; typedef uint8_t lv_chart_axis_t; +enum { + LV_CHART_CURSOR_NONE = 0x00, + LV_CHART_CURSOR_RIGHT = 0x01, + LV_CHART_CURSOR_UP = 0x02, + LV_CHART_CURSOR_LEFT = 0x04, + LV_CHART_CURSOR_DOWN = 0x08 +}; +typedef uint8_t lv_cursor_direction_t; + typedef struct { lv_coord_t * points; lv_color_t color; @@ -69,6 +78,12 @@ typedef struct { lv_chart_axis_t y_axis : 1; } lv_chart_series_t; +typedef struct { + lv_point_t point; + lv_color_t color; + lv_cursor_direction_t axes : 4; +} lv_chart_cursor_t; + /** Data of axis */ enum { LV_CHART_AXIS_SKIP_LAST_TICK = 0x00, /**< don't draw the last tick */ @@ -90,6 +105,7 @@ typedef struct { /*No inherited ext*/ /*Ext. of ancestor*/ /*New data for this type */ lv_ll_t series_ll; /*Linked list for the data line pointers (stores lv_chart_series_t)*/ + lv_ll_t cursors_ll; /*Linked list for the cursor pointers (stores lv_chart_cursor_t)*/ lv_coord_t ymin[_LV_CHART_AXIS_LAST]; /*y min values for both axis (used to scale the data)*/ lv_coord_t ymax[_LV_CHART_AXIS_LAST]; /*y max values for both axis (used to scale the data)*/ uint8_t hdiv_cnt; /*Number of horizontal division lines*/ @@ -97,6 +113,7 @@ typedef struct { uint16_t point_cnt; /*Point number in a data line*/ lv_style_list_t style_series_bg; lv_style_list_t style_series; + lv_style_list_t style_cursors; lv_chart_type_t type; /*Line, column or point chart (from 'lv_chart_type_t')*/ lv_chart_axis_cfg_t y_axis; lv_chart_axis_cfg_t x_axis; @@ -108,7 +125,8 @@ typedef struct { enum { LV_CHART_PART_BG = LV_OBJ_PART_MAIN, LV_CHART_PART_SERIES_BG = _LV_OBJ_PART_VIRTUAL_LAST, - LV_CHART_PART_SERIES + LV_CHART_PART_SERIES, + LV_CHART_PART_CURSOR }; /********************** @@ -136,6 +154,15 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy); */ lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color); +/** + * Add a cursor with a given color + * @param chart pointer to chart object + * @param color color of the cursor + * @param dir direction of the cursor. `LV_CHART_CURSOR_RIGHT/LEFT/TOP/DOWN`. OR-ed vaĆ©ues are possible + * @return pointer to the created cursor + */ +lv_chart_cursor_t * lv_chart_add_cursor(lv_obj_t * chart, lv_color_t color, lv_cursor_direction_t dir); + /** * Clear the point of a series * @param chart pointer to a chart object @@ -307,6 +334,16 @@ void lv_chart_set_point_id(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t */ void lv_chart_set_series_axis(lv_obj_t * chart, lv_chart_series_t * ser, lv_chart_axis_t axis); +/** + * Set the coordinate of the cursor with respect + * to the origin of series area of the chart. + * @param chart pointer to a chart object. + * @param cursor pointer to the cursor. + * @param point the new coordinate of cursor relative to the series area + */ +void lv_chart_set_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_point_t * point); + + /*===================== * Getter functions *====================*/ @@ -349,6 +386,50 @@ lv_coord_t lv_chart_get_point_id(lv_obj_t * chart, lv_chart_series_t * ser, uint */ lv_chart_axis_t lv_chart_get_series_axis(lv_obj_t * chart, lv_chart_series_t * ser); +/** + * Get an individual point y value in the chart series directly based on index + * @param chart pointer to a chart object + * @param series_area pointer to an area variable that the result will put in. + */ +void lv_chart_get_series_area(lv_obj_t * chart, lv_area_t * series_area); + +/** + * Get the coordinate of the cursor with respect + * to the origin of series area of the chart. + * @param chart pointer to a chart object + * @param cursor pointer to cursor + * @return coordinate of the cursor as lv_point_t + */ +lv_point_t lv_chart_get_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor); + +/** + * Get the nearest index to an X coordinate + * @param chart pointer to a chart object + * @param coord the coordination of the point relative to the series area. + * @return the found index + */ +uint16_t lv_chart_get_nearest_index_from_coord(lv_obj_t * chart, lv_coord_t x); + +/** + * Get the x coordinate of the an index with respect + * to the origin of series area of the chart. + * @param chart pointer to a chart object + * @param ser pointer to series + * @param id the index. + * @return x coordinate of index + */ +lv_coord_t lv_chart_get_x_from_index(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t id); + +/** + * Get the y coordinate of the an index with respect + * to the origin of series area of the chart. + * @param chart pointer to a chart object + * @param ser pointer to series + * @param id the index. + * @return y coordinate of index + */ +lv_coord_t lv_chart_get_y_from_index(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t id); + /*===================== * Other functions *====================*/ diff --git a/src/lv_widgets/lv_cont.c b/src/lv_widgets/lv_cont.c new file mode 100644 index 000000000..08a0e4e6f --- /dev/null +++ b/src/lv_widgets/lv_cont.c @@ -0,0 +1,805 @@ +/** + * @file lv_cont.c + * + */ + +/********************* + * INCLUDES + *********************/ + +#include "lv_cont.h" +#if LV_USE_CONT != 0 + +#include +#include +#include + +#include "../lv_misc/lv_debug.h" +#include "../lv_draw/lv_draw.h" +#include "../lv_draw/lv_draw_mask.h" +#include "../lv_themes/lv_theme.h" +#include "../lv_misc/lv_area.h" +#include "../lv_misc/lv_color.h" +#include "../lv_misc/lv_math.h" + +/********************* + * DEFINES + *********************/ +#define LV_OBJX_NAME "lv_cont" + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ +static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param); +static lv_style_list_t * lv_cont_get_style(lv_obj_t * cont, uint8_t type); +static void lv_cont_refr_layout(lv_obj_t * cont); +static void lv_cont_layout_col(lv_obj_t * cont); +static void lv_cont_layout_row(lv_obj_t * cont); +static void lv_cont_layout_center(lv_obj_t * cont); +static void lv_cont_layout_pretty(lv_obj_t * cont); +static void lv_cont_layout_grid(lv_obj_t * cont); +static void lv_cont_refr_autofit(lv_obj_t * cont); + +/********************** + * STATIC VARIABLES + **********************/ +static lv_design_cb_t ancestor_design; +static lv_signal_cb_t ancestor_signal; + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/** + * Create a container objects + * @param par pointer to an object, it will be the parent of the new container + * @param copy pointer to a container object, if not NULL then the new object will be copied from it + * @return pointer to the created container + */ +lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) +{ + + LV_LOG_TRACE("container create started"); + + /*Create a basic object*/ + lv_obj_t * cont = lv_obj_create(par, copy); + LV_ASSERT_MEM(cont); + if(cont == NULL) return NULL; + + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(cont); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(cont); + + lv_obj_allocate_ext_attr(cont, sizeof(lv_cont_ext_t)); + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + if(ext == NULL) { + lv_obj_del(cont); + return NULL; + } + + LV_ASSERT_MEM(ext); + ext->fit_left = LV_FIT_NONE; + ext->fit_right = LV_FIT_NONE; + ext->fit_top = LV_FIT_NONE; + ext->fit_bottom = LV_FIT_NONE; + ext->layout = LV_LAYOUT_OFF; + + lv_obj_set_signal_cb(cont, lv_cont_signal); + + /*Init the new container*/ + if(copy == NULL) { + /*Set the default styles if it's not screen*/ + if(par != NULL) { + lv_theme_apply(cont, LV_THEME_CONT); + } + + + } + /*Copy an existing object*/ + else { + lv_cont_ext_t * copy_ext = lv_obj_get_ext_attr(copy); + ext->fit_left = copy_ext->fit_left; + ext->fit_right = copy_ext->fit_right; + ext->fit_top = copy_ext->fit_top; + ext->fit_bottom = copy_ext->fit_bottom; + ext->layout = copy_ext->layout; + + /*Refresh the style with new signal function*/ + lv_obj_refresh_style(cont, LV_OBJ_PART_ALL, LV_STYLE_PROP_ALL); + } + + LV_LOG_INFO("container created"); + + return cont; +} + +/*===================== + * Setter functions + *====================*/ + +/** + * Set a layout on a container + * @param cont pointer to a container object + * @param layout a layout from 'lv_cont_layout_t' + */ +void lv_cont_set_layout(lv_obj_t * cont, lv_layout_t layout) +{ + LV_ASSERT_OBJ(cont, LV_OBJX_NAME); + + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + if(ext->layout == layout) return; + + ext->layout = layout; + + /*Send a signal to refresh the layout*/ + cont->signal_cb(cont, LV_SIGNAL_CHILD_CHG, NULL); +} + +/** + * Set the fit policy in all 4 directions separately. + * It tell how to change the container's size automatically. + * @param cont pointer to a container object + * @param left left fit policy from `lv_fit_t` + * @param right right fit policy from `lv_fit_t` + * @param top bottom fit policy from `lv_fit_t` + * @param bottom bottom fit policy from `lv_fit_t` + */ +void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom) +{ + LV_ASSERT_OBJ(cont, LV_OBJX_NAME); + + lv_obj_invalidate(cont); + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + if(ext->fit_left == left && ext->fit_right == right && ext->fit_top == top && ext->fit_bottom == bottom) { + return; + } + + ext->fit_left = left; + ext->fit_right = right; + ext->fit_top = top; + ext->fit_bottom = bottom; + + /*Send a signal to refresh the layout*/ + cont->signal_cb(cont, LV_SIGNAL_CHILD_CHG, NULL); +} + +/*===================== + * Getter functions + *====================*/ + +/** + * Get the layout of a container + * @param cont pointer to container object + * @return the layout from 'lv_cont_layout_t' + */ +lv_layout_t lv_cont_get_layout(const lv_obj_t * cont) +{ + LV_ASSERT_OBJ(cont, LV_OBJX_NAME); + + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + return ext->layout; +} + +/** + * Get left fit mode of a container + * @param cont pointer to a container object + * @return an element of `lv_fit_t` + */ +lv_fit_t lv_cont_get_fit_left(const lv_obj_t * cont) +{ + LV_ASSERT_OBJ(cont, LV_OBJX_NAME); + + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + return ext->fit_left; +} + +/** + * Get right fit mode of a container + * @param cont pointer to a container object + * @return an element of `lv_fit_t` + */ +lv_fit_t lv_cont_get_fit_right(const lv_obj_t * cont) +{ + LV_ASSERT_OBJ(cont, LV_OBJX_NAME); + + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + return ext->fit_right; +} + +/** + * Get top fit mode of a container + * @param cont pointer to a container object + * @return an element of `lv_fit_t` + */ +lv_fit_t lv_cont_get_fit_top(const lv_obj_t * cont) +{ + LV_ASSERT_OBJ(cont, LV_OBJX_NAME); + + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + return ext->fit_top; +} + +/** + * Get bottom fit mode of a container + * @param cont pointer to a container object + * @return an element of `lv_fit_t` + */ +lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont) +{ + LV_ASSERT_OBJ(cont, LV_OBJX_NAME); + + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + return ext->fit_bottom; +} + +/********************** + * STATIC FUNCTIONS + **********************/ + +/** + * Signal function of the container + * @param cont pointer to a container object + * @param sign a signal type from lv_signal_t enum + * @param param pointer to a signal specific variable + * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted + */ +static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param) +{ + if(sign == LV_SIGNAL_GET_STYLE) { + lv_get_style_info_t * info = param; + info->result = lv_cont_get_style(cont, info->part); + if(info->result != NULL) return LV_RES_OK; + else return ancestor_signal(cont, sign, param); + } + + lv_res_t res; + + /* Include the ancient signal function */ + res = ancestor_signal(cont, sign, param); + if(res != LV_RES_OK) return res; + if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME); + + if(sign == LV_SIGNAL_STYLE_CHG) { /*Recalculate the padding if the style changed*/ + lv_cont_refr_layout(cont); + lv_cont_refr_autofit(cont); + } + else if(sign == LV_SIGNAL_CHILD_CHG) { + lv_cont_refr_layout(cont); + lv_cont_refr_autofit(cont); + } + else if(sign == LV_SIGNAL_COORD_CHG) { + if(lv_obj_get_width(cont) != lv_area_get_width(param) || lv_obj_get_height(cont) != lv_area_get_height(param)) { + lv_cont_refr_layout(cont); + lv_cont_refr_autofit(cont); + } + } + else if(sign == LV_SIGNAL_PARENT_SIZE_CHG) { + /*MAX and EDGE fit needs to be refreshed if the parent's size has changed*/ + lv_cont_refr_autofit(cont); + } + + return res; +} + + +static lv_style_list_t * lv_cont_get_style(lv_obj_t * cont, uint8_t type) +{ + lv_style_list_t * style_dsc_p; + switch(type) { + case LV_CONT_PART_MAIN: + style_dsc_p = &cont->style_list; + break; + default: + style_dsc_p = NULL; + } + + return style_dsc_p; +} + +/** + * Refresh the layout of a container + * @param cont pointer to an object which layout should be refreshed + */ +static void lv_cont_refr_layout(lv_obj_t * cont) +{ + if(lv_obj_is_protected(cont, LV_PROTECT_CHILD_CHG)) return; + lv_layout_t type = lv_cont_get_layout(cont); + + /*'cont' has to be at least 1 child*/ + if(lv_obj_get_child(cont, NULL) == NULL) return; + + if(type == LV_LAYOUT_OFF) return; + + if(type == LV_LAYOUT_CENTER) { + lv_cont_layout_center(cont); + } + else if(type == LV_LAYOUT_COLUMN_LEFT || type == LV_LAYOUT_COLUMN_MID || type == LV_LAYOUT_COLUMN_RIGHT) { + lv_cont_layout_col(cont); + } + else if(type == LV_LAYOUT_ROW_TOP || type == LV_LAYOUT_ROW_MID || type == LV_LAYOUT_ROW_BOTTOM) { + lv_cont_layout_row(cont); + } + else if(type == LV_LAYOUT_PRETTY_MID || type == LV_LAYOUT_PRETTY_TOP || type == LV_LAYOUT_PRETTY_BOTTOM) { + lv_cont_layout_pretty(cont); + } + else if(type == LV_LAYOUT_GRID) { + lv_cont_layout_grid(cont); + } +} + +/** + * Handle column type layouts + * @param cont pointer to an object which layout should be handled + */ +static void lv_cont_layout_col(lv_obj_t * cont) +{ + lv_coord_t left = lv_obj_get_style_pad_left(cont, LV_CONT_PART_MAIN); + lv_coord_t right = lv_obj_get_style_pad_right(cont, LV_CONT_PART_MAIN); + lv_coord_t top = lv_obj_get_style_pad_top(cont, LV_CONT_PART_MAIN); + lv_coord_t inner = lv_obj_get_style_pad_inner(cont, LV_CONT_PART_MAIN); + + lv_layout_t type = lv_cont_get_layout(cont); + lv_obj_t * child; + + /*Adjust margin and get the alignment type*/ + lv_align_t align; + lv_coord_t hpad_corr; + + switch(type) { + case LV_LAYOUT_COLUMN_LEFT: + hpad_corr = left; + align = LV_ALIGN_IN_TOP_LEFT; + break; + case LV_LAYOUT_COLUMN_MID: + hpad_corr = 0; + align = LV_ALIGN_IN_TOP_MID; + break; + case LV_LAYOUT_COLUMN_RIGHT: + hpad_corr = -right; + align = LV_ALIGN_IN_TOP_RIGHT; + break; + default: + hpad_corr = 0; + align = LV_ALIGN_IN_TOP_LEFT; + break; + } + + /* Disable child change action because the children will be moved a lot + * an unnecessary child change signals could be sent*/ + lv_obj_add_protect(cont, LV_PROTECT_CHILD_CHG); + /* Align the children */ + lv_coord_t last_cord = top; + _LV_LL_READ_BACK(cont->child_ll, child) { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + lv_style_int_t mtop = lv_obj_get_style_margin_top(child, LV_OBJ_PART_MAIN); + lv_style_int_t mbottom = lv_obj_get_style_margin_bottom(child, LV_OBJ_PART_MAIN); + lv_style_int_t mleft = lv_obj_get_style_margin_left(child, LV_OBJ_PART_MAIN); + lv_obj_align(child, cont, align, hpad_corr + mleft, last_cord + mtop); + last_cord += lv_obj_get_height(child) + inner + mtop + mbottom; + } + + lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG); +} + +/** + * Handle row type layouts + * @param cont pointer to an object which layout should be handled + */ +static void lv_cont_layout_row(lv_obj_t * cont) +{ + + lv_layout_t type = lv_cont_get_layout(cont); + lv_obj_t * child; + + /*Adjust margin and get the alignment type*/ + lv_align_t align; + lv_coord_t vpad_corr; + lv_bidi_dir_t base_dir = lv_obj_get_base_dir(cont); + switch(type) { + case LV_LAYOUT_ROW_TOP: + vpad_corr = lv_obj_get_style_pad_top(cont, LV_CONT_PART_MAIN); + align = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_TOP_RIGHT : LV_ALIGN_IN_TOP_LEFT; + break; + case LV_LAYOUT_ROW_MID: + vpad_corr = 0; + align = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_RIGHT_MID : LV_ALIGN_IN_LEFT_MID; + break; + case LV_LAYOUT_ROW_BOTTOM: + vpad_corr = -lv_obj_get_style_pad_bottom(cont, LV_CONT_PART_MAIN); + align = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_BOTTOM_RIGHT : LV_ALIGN_IN_BOTTOM_LEFT; + break; + default: + vpad_corr = 0; + align = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_TOP_RIGHT : LV_ALIGN_IN_TOP_LEFT; + break; + } + + /* Disable child change action because the children will be moved a lot + * an unnecessary child change signals could be sent*/ + lv_obj_add_protect(cont, LV_PROTECT_CHILD_CHG); + + /* Align the children */ + lv_coord_t last_cord; + if(base_dir == LV_BIDI_DIR_RTL) last_cord = lv_obj_get_style_pad_right(cont, LV_CONT_PART_MAIN); + else last_cord = lv_obj_get_style_pad_left(cont, LV_CONT_PART_MAIN); + + lv_coord_t inner = lv_obj_get_style_pad_inner(cont, LV_CONT_PART_MAIN); + + _LV_LL_READ_BACK(cont->child_ll, child) { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + + if(base_dir == LV_BIDI_DIR_RTL) lv_obj_align(child, cont, align, -last_cord, vpad_corr); + else lv_obj_align(child, cont, align, last_cord, vpad_corr); + + last_cord += lv_obj_get_width(child) + inner; + } + + lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG); +} + +/** + * Handle the center layout + * @param cont pointer to an object which layout should be handled + */ +static void lv_cont_layout_center(lv_obj_t * cont) +{ + lv_obj_t * child; + uint32_t obj_num = 0; + lv_coord_t h_tot = 0; + + lv_coord_t inner = lv_obj_get_style_pad_inner(cont, LV_CONT_PART_MAIN); + _LV_LL_READ(cont->child_ll, child) { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + h_tot += lv_obj_get_height(child) + inner; + obj_num++; + } + + if(obj_num == 0) return; + + h_tot -= inner; + + /* Disable child change action because the children will be moved a lot + * an unnecessary child change signals could be sent*/ + lv_obj_add_protect(cont, LV_PROTECT_CHILD_CHG); + + /* Align the children */ + lv_coord_t last_cord = -(h_tot / 2); + _LV_LL_READ_BACK(cont->child_ll, child) { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + + lv_obj_align(child, cont, LV_ALIGN_CENTER, 0, last_cord + lv_obj_get_height(child) / 2); + last_cord += lv_obj_get_height(child) + inner; + } + + lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG); +} + +/** + * Handle the pretty layout. Put as many object as possible in row + * then begin a new row + * @param cont pointer to an object which layout should be handled + */ +static void lv_cont_layout_pretty(lv_obj_t * cont) +{ + lv_layout_t type = lv_cont_get_layout(cont); + + lv_obj_t * child_rs; /* Row starter child */ + lv_obj_t * child_rc; /* Row closer child */ + lv_obj_t * child_tmp; /* Temporary child */ + lv_coord_t w_obj = lv_obj_get_width(cont); + lv_coord_t act_y = lv_obj_get_style_pad_top(cont, LV_CONT_PART_MAIN); + /* Disable child change action because the children will be moved a lot + * an unnecessary child change signals could be sent*/ + + child_rs = _lv_ll_get_tail(&cont->child_ll); /*Set the row starter child*/ + if(child_rs == NULL) return; /*Return if no child*/ + + lv_obj_add_protect(cont, LV_PROTECT_CHILD_CHG); + lv_coord_t pleft = lv_obj_get_style_pad_left(cont, LV_CONT_PART_MAIN); + lv_coord_t pright = lv_obj_get_style_pad_right(cont, LV_CONT_PART_MAIN); + lv_coord_t pinner = lv_obj_get_style_pad_inner(cont, LV_CONT_PART_MAIN); + + child_rc = child_rs; /*Initially the the row starter and closer is the same*/ + while(child_rs != NULL) { + lv_coord_t h_row = 0; + lv_coord_t w_row = pleft + pright; /*The width is at least the left+right pad*/ + uint32_t obj_num = 0; + + /*Find the row closer object and collect some data*/ + do { + if(lv_obj_get_hidden(child_rc) == false && lv_obj_is_protected(child_rc, LV_PROTECT_POS) == false) { + /*If this object is already not fit then break*/ + lv_coord_t w = lv_obj_get_width(child_rc); + w += lv_obj_get_style_margin_left(child_rc, LV_OBJ_PART_MAIN); + w += lv_obj_get_style_margin_right(child_rc, LV_OBJ_PART_MAIN); + if(w_row + w > w_obj) { + /*Step back one child because the last already not fit, so the previous is the + * closer*/ + if(child_rc != NULL && obj_num != 0) { + child_rc = _lv_ll_get_next(&cont->child_ll, child_rc); + } + break; + } + w_row += w + pinner; /*Add the object width + inner padding*/ + + lv_coord_t h = lv_obj_get_height(child_rc); + h += lv_obj_get_style_margin_top(child_rc, LV_OBJ_PART_MAIN); + h += lv_obj_get_style_margin_bottom(child_rc, LV_OBJ_PART_MAIN); + h_row = LV_MATH_MAX(h_row, h); /*Search the highest object*/ + obj_num++; + if(lv_obj_is_protected(child_rc, LV_PROTECT_FOLLOW)) + break; /*If can not be followed by an other object then break here*/ + } + child_rc = _lv_ll_get_prev(&cont->child_ll, child_rc); /*Load the next object*/ + if(obj_num == 0) + child_rs = child_rc; /*If the first object was hidden (or too long) then set the + next as first */ + } while(child_rc != NULL); + + /*If the object is too long then align it to the middle*/ + if(obj_num == 0) { + if(child_rc != NULL) { + lv_style_int_t mtop = lv_obj_get_style_margin_top(child_rc, LV_OBJ_PART_MAIN); + + lv_obj_align(child_rc, cont, LV_ALIGN_IN_TOP_MID, 0, act_y + mtop); + h_row = lv_obj_get_height(child_rc); /*Not set previously because of the early break*/ + h_row += mtop; + h_row += lv_obj_get_style_margin_bottom(child_rc, LV_OBJ_PART_MAIN); + } + } + /*If there is only one object in the row then align it to the middle*/ + else if(obj_num == 1) { + lv_obj_align(child_rs, cont, LV_ALIGN_IN_TOP_MID, + 0, + act_y + lv_obj_get_style_margin_top(child_rs, LV_OBJ_PART_MAIN)); + } + /* Align the children (from child_rs to child_rc)*/ + else { + w_row -= pinner * obj_num; + lv_coord_t new_pinner = (w_obj - w_row) / (obj_num - 1); + lv_coord_t act_x = pleft; /*x init*/ + child_tmp = child_rs; + lv_align_t align; + int32_t inv; + if(lv_obj_get_base_dir(cont) == LV_BIDI_DIR_RTL) { + align = LV_ALIGN_IN_TOP_RIGHT; + inv = -1; + } + else { + align = LV_ALIGN_IN_TOP_LEFT; + inv = 1; + } + while(child_tmp != NULL) { + if(lv_obj_get_hidden(child_tmp) == false && lv_obj_is_protected(child_tmp, LV_PROTECT_POS) == false) { + lv_coord_t mleft = lv_obj_get_style_margin_left(child_tmp, LV_OBJ_PART_MAIN); + lv_coord_t mright = lv_obj_get_style_margin_right(child_tmp, LV_OBJ_PART_MAIN); + switch(type) { + case LV_LAYOUT_PRETTY_TOP: + lv_obj_align(child_tmp, cont, align, + inv * (act_x + mleft), + act_y + lv_obj_get_style_margin_top(child_tmp, LV_OBJ_PART_MAIN)); + break; + case LV_LAYOUT_PRETTY_MID: + lv_obj_align(child_tmp, cont, align, + inv * (act_x + mleft), + act_y + (h_row - lv_obj_get_height(child_tmp)) / 2); + + break; + case LV_LAYOUT_PRETTY_BOTTOM: + lv_obj_align(child_tmp, cont, align, + inv * (act_x + mleft), + act_y + h_row - lv_obj_get_height(child_tmp) - lv_obj_get_style_margin_bottom(child_tmp, LV_OBJ_PART_MAIN)); + break; + default: + break; + } + + act_x += lv_obj_get_width(child_tmp) + new_pinner + mleft + mright; + } + if(child_tmp == child_rc) break; + child_tmp = _lv_ll_get_prev(&cont->child_ll, child_tmp); + } + } + + if(child_rc == NULL) break; + act_y += pinner + h_row; /*y increment*/ + child_rs = _lv_ll_get_prev(&cont->child_ll, child_rc); /*Go to the next object*/ + child_rc = child_rs; + } + lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG); +} + +/** + * Handle the grid layout. Align same-sized objects in a grid + * @param cont pointer to an object which layout should be handled + */ +static void lv_cont_layout_grid(lv_obj_t * cont) +{ + lv_coord_t w_fit = lv_obj_get_width_fit(cont); + lv_coord_t inner = lv_obj_get_style_pad_inner(cont, LV_CONT_PART_MAIN); + lv_coord_t y_ofs = inner + lv_obj_get_height(lv_obj_get_child(cont, NULL)); + + /* Disable child change action because the children will be moved a lot + * an unnecessary child change signals could be sent*/ + lv_obj_add_protect(cont, LV_PROTECT_CHILD_CHG); + + /* Align the children */ + lv_coord_t left = lv_obj_get_style_pad_left(cont, LV_CONT_PART_MAIN); + lv_coord_t act_x = left; + lv_coord_t act_y = lv_obj_get_style_pad_top(cont, LV_CONT_PART_MAIN); + lv_obj_t * child; + _LV_LL_READ_BACK(cont->child_ll, child) { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + lv_coord_t obj_w = lv_obj_get_width(child); + if(act_x + obj_w > w_fit + left) { + act_x = left; + act_y += y_ofs; + } + + lv_obj_set_pos(child, act_x, act_y); + act_x += inner + obj_w; + } + + lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG); +} + +/** + * Handle auto fit. Set the size of the object to involve all children. + * @param cont pointer to an object which size will be modified + */ +static void lv_cont_refr_autofit(lv_obj_t * cont) +{ + if(lv_obj_is_protected(cont, LV_PROTECT_CHILD_CHG)) return; + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + + if(ext->fit_left == LV_FIT_NONE && ext->fit_right == LV_FIT_NONE && ext->fit_top == LV_FIT_NONE && + ext->fit_bottom == LV_FIT_NONE) { + return; + } + + lv_area_t tight_area; + lv_area_t ori; + lv_obj_t * child_i; + + lv_obj_t * par = lv_obj_get_parent(cont); + lv_area_t parent_area; + lv_area_copy(&parent_area, &par->coords); + parent_area.x1 += lv_obj_get_style_pad_left(par, LV_OBJ_PART_MAIN); + parent_area.x2 -= lv_obj_get_style_pad_right(par, LV_OBJ_PART_MAIN); + parent_area.y1 += lv_obj_get_style_pad_top(par, LV_OBJ_PART_MAIN); + parent_area.y2 -= lv_obj_get_style_pad_bottom(par, LV_OBJ_PART_MAIN); + + /*Search the side coordinates of the children*/ + lv_obj_get_coords(cont, &ori); + lv_obj_get_coords(cont, &tight_area); + + bool has_children = _lv_ll_is_empty(&cont->child_ll) ? false : true; + + if(has_children) { + tight_area.x1 = LV_COORD_MAX; + tight_area.y1 = LV_COORD_MAX; + tight_area.x2 = LV_COORD_MIN; + tight_area.y2 = LV_COORD_MIN; + + _LV_LL_READ(cont->child_ll, child_i) { + if(lv_obj_get_hidden(child_i) != false) continue; + + if(ext->fit_left != LV_FIT_PARENT) { + lv_style_int_t mleft = lv_obj_get_style_margin_left(child_i, LV_OBJ_PART_MAIN); + tight_area.x1 = LV_MATH_MIN(tight_area.x1, child_i->coords.x1 - mleft); + } + + if(ext->fit_right != LV_FIT_PARENT) { + lv_style_int_t mright = lv_obj_get_style_margin_right(child_i, LV_OBJ_PART_MAIN); + tight_area.x2 = LV_MATH_MAX(tight_area.x2, child_i->coords.x2 + mright); + } + + if(ext->fit_top != LV_FIT_PARENT) { + lv_style_int_t mtop = lv_obj_get_style_margin_top(child_i, LV_OBJ_PART_MAIN); + tight_area.y1 = LV_MATH_MIN(tight_area.y1, child_i->coords.y1 - mtop); + } + + if(ext->fit_bottom != LV_FIT_PARENT) { + lv_style_int_t mbottom = lv_obj_get_style_margin_bottom(child_i, LV_OBJ_PART_MAIN); + tight_area.y2 = LV_MATH_MAX(tight_area.y2, child_i->coords.y2 + mbottom); + } + } + + tight_area.x1 -= lv_obj_get_style_pad_left(cont, LV_CONT_PART_MAIN); + tight_area.x2 += lv_obj_get_style_pad_right(cont, LV_CONT_PART_MAIN); + tight_area.y1 -= lv_obj_get_style_pad_top(cont, LV_CONT_PART_MAIN); + tight_area.y2 += lv_obj_get_style_pad_bottom(cont, LV_CONT_PART_MAIN); + } + + lv_area_t new_area; + lv_area_copy(&new_area, &ori); + + switch(ext->fit_left) { + case LV_FIT_TIGHT: + new_area.x1 = tight_area.x1; + break; + case LV_FIT_PARENT: + new_area.x1 = parent_area.x1; + break; + case LV_FIT_MAX: + new_area.x1 = has_children ? LV_MATH_MIN(tight_area.x1, parent_area.x1) : parent_area.x1; + break; + default: + break; + } + + switch(ext->fit_right) { + case LV_FIT_TIGHT: + new_area.x2 = tight_area.x2; + break; + case LV_FIT_PARENT: + new_area.x2 = parent_area.x2; + break; + case LV_FIT_MAX: + new_area.x2 = has_children ? LV_MATH_MAX(tight_area.x2, parent_area.x2) : parent_area.x2; + break; + default: + break; + } + + switch(ext->fit_top) { + case LV_FIT_TIGHT: + new_area.y1 = tight_area.y1; + break; + case LV_FIT_PARENT: + new_area.y1 = parent_area.y1; + break; + case LV_FIT_MAX: + new_area.y1 = has_children ? LV_MATH_MIN(tight_area.y1, parent_area.y1) : parent_area.y1; + break; + default: + break; + } + + switch(ext->fit_bottom) { + case LV_FIT_TIGHT: + new_area.y2 = tight_area.y2; + break; + case LV_FIT_PARENT: + new_area.y2 = parent_area.y2; + break; + case LV_FIT_MAX: + new_area.y2 = has_children ? LV_MATH_MAX(tight_area.y2, parent_area.y2) : parent_area.y2; + break; + default: + break; + } + + /*Do nothing if the coordinates are not changed*/ + if(cont->coords.x1 != new_area.x1 || cont->coords.y1 != new_area.y1 || cont->coords.x2 != new_area.x2 || + cont->coords.y2 != new_area.y2) { + + lv_obj_invalidate(cont); + lv_area_copy(&cont->coords, &new_area); + lv_obj_invalidate(cont); + + /*Notify the object about its new coordinates*/ + cont->signal_cb(cont, LV_SIGNAL_COORD_CHG, &ori); + + /*Inform the parent about the new coordinates*/ + par->signal_cb(par, LV_SIGNAL_CHILD_CHG, cont); + + if(lv_obj_get_auto_realign(cont)) { + lv_obj_realign(cont); + } + + /*Tell the children the parent's size has changed*/ + _LV_LL_READ(cont->child_ll, child_i) { + child_i->signal_cb(child_i, LV_SIGNAL_PARENT_SIZE_CHG, &ori); + } + } +} + +#endif diff --git a/src/lv_widgets/lv_dropdown.c b/src/lv_widgets/lv_dropdown.c index 90b2877b5..9f2745709 100644 --- a/src/lv_widgets/lv_dropdown.c +++ b/src/lv_widgets/lv_dropdown.c @@ -52,7 +52,7 @@ static void draw_box(lv_obj_t * ddlist, const lv_area_t * clip_area, uint16_t id static void draw_box_label(lv_obj_t * ddlist, const lv_area_t * clip_area, uint16_t id, lv_state_t state); static lv_res_t list_release_handler(lv_obj_t * page); static void page_press_handler(lv_obj_t * page); -static uint16_t get_id_on_point(lv_obj_t * ddlist, lv_coord_t x, lv_coord_t y); +static uint16_t get_id_on_point(lv_obj_t * ddlist, lv_coord_t y); static void position_to_selected(lv_obj_t * ddlist); static lv_obj_t * get_label(const lv_obj_t * ddlist); @@ -1128,7 +1128,7 @@ static lv_res_t list_release_handler(lv_obj_t * page) if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { lv_point_t p; lv_indev_get_point(indev, &p); - ext->sel_opt_id = get_id_on_point(ddlist, p.x, p.y); + ext->sel_opt_id = get_id_on_point(ddlist, p.y); ext->sel_opt_id_orig = ext->sel_opt_id; } @@ -1156,36 +1156,25 @@ static void page_press_handler(lv_obj_t * page) if(indev && (lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON)) { lv_point_t p; lv_indev_get_point(indev, &p); - ext->pr_opt_id = get_id_on_point(ddlist, p.x, p.y); + ext->pr_opt_id = get_id_on_point(ddlist, p.y); lv_obj_invalidate(page); } } -static uint16_t get_id_on_point(lv_obj_t * ddlist, lv_coord_t x, lv_coord_t y) +static uint16_t get_id_on_point(lv_obj_t * ddlist, lv_coord_t y) { lv_obj_t * label = get_label(ddlist); if(label == NULL) return 0; - x -= label->coords.x1; y -= label->coords.y1; - uint32_t letter_i; - const char * txt = lv_label_get_text(label); + const lv_font_t * font = lv_obj_get_style_text_font(label, LV_LABEL_PART_MAIN); + lv_coord_t font_h = lv_font_get_line_height(font); + lv_style_int_t line_space = lv_obj_get_style_text_line_space(label, LV_LABEL_PART_MAIN); - lv_point_t p = {x, y}; - letter_i = lv_label_get_letter_on(label, &p); - uint32_t letter_i_byte_pos = _lv_txt_encoded_get_byte_id(txt, letter_i); - uint16_t opt = 0; - uint32_t i = 0; - uint32_t i_prev = 0; + y += line_space / 2; + lv_coord_t h = font_h + line_space; - uint32_t letter_cnt = 0; - for(letter_cnt = 0; letter_cnt < letter_i; letter_cnt++) { - uint32_t letter = _lv_txt_encoded_next(txt, &i); - /*Count the lines to reach the clicked letter. But ignore the last '\n' because it - * still belongs to the clicked line*/ - if(letter == '\n' && i_prev != letter_i_byte_pos) opt++; - i_prev = i; - } + uint16_t opt = y / h; return opt; } diff --git a/src/lv_widgets/lv_img.c b/src/lv_widgets/lv_img.c index 7cb3abf49..ee1fbc0f7 100644 --- a/src/lv_widgets/lv_img.c +++ b/src/lv_widgets/lv_img.c @@ -652,10 +652,10 @@ static lv_design_res_t lv_img_design(lv_obj_t * img, const lv_area_t * clip_area coords_tmp.y1 = zommed_coords.y1; coords_tmp.y2 = zommed_coords.y1 + ext->h - 1; - for(; coords_tmp.y1 <= zommed_coords.y2; coords_tmp.y1 += zoomed_src_h, coords_tmp.y2 += zoomed_src_h) { + for(; coords_tmp.y1 < zommed_coords.y2; coords_tmp.y1 += zoomed_src_h, coords_tmp.y2 += zoomed_src_h) { coords_tmp.x1 = zommed_coords.x1; coords_tmp.x2 = zommed_coords.x1 + ext->w - 1; - for(; coords_tmp.x1 <= zommed_coords.x2; coords_tmp.x1 += zoomed_src_w, coords_tmp.x2 += zoomed_src_w) { + for(; coords_tmp.x1 < zommed_coords.x2; coords_tmp.x1 += zoomed_src_w, coords_tmp.x2 += zoomed_src_w) { lv_draw_img(&coords_tmp, &clip_real, ext->src, &img_dsc); } } diff --git a/src/lv_widgets/lv_imgbtn.c b/src/lv_widgets/lv_imgbtn.c index a84a04935..3dca1c9e2 100644 --- a/src/lv_widgets/lv_imgbtn.c +++ b/src/lv_widgets/lv_imgbtn.c @@ -470,6 +470,9 @@ static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * par imgbtn->ext_draw_pad = LV_MATH_MAX(imgbtn->ext_draw_pad, top); imgbtn->ext_draw_pad = LV_MATH_MAX(imgbtn->ext_draw_pad, bottom); } + else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { + refr_img(imgbtn); + } else if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } diff --git a/src/lv_widgets/lv_table.c b/src/lv_widgets/lv_table.c index 61e5bd7cf..56f6f4fa3 100644 --- a/src/lv_widgets/lv_table.c +++ b/src/lv_widgets/lv_table.c @@ -183,10 +183,10 @@ void lv_table_set_cell_value(lv_obj_t * table, uint16_t row, uint16_t col, const _lv_txt_ap_proc(txt, &ext->cell_data[cell][1]); #else ext->cell_data[cell] = lv_mem_realloc(ext->cell_data[cell], strlen(txt) + 2); /*+1: trailing '\0; +1: format byte*/ - LV_ASSERT_MEM(ext->cell_data[cell]); - if(ext->cell_data[cell] == NULL) return; + LV_ASSERT_MEM(ext->cell_data[cell]); + if(ext->cell_data[cell] == NULL) return; - strcpy(ext->cell_data[cell] + 1, txt); /*+1 to skip the format byte*/ + strcpy(ext->cell_data[cell] + 1, txt); /*+1 to skip the format byte*/ #endif ext->cell_data[cell][0] = format.format_byte; @@ -241,12 +241,12 @@ void lv_table_set_cell_value_fmt(lv_obj_t * table, uint16_t row, uint16_t col, c } va_list ap, ap2; - va_start(ap, fmt); - va_copy(ap2, ap); + va_start(ap, fmt); + va_copy(ap2, ap); - /*Allocate space for the new text by using trick from C99 standard section 7.19.6.12 */ - uint32_t len = lv_vsnprintf(NULL, 0, fmt, ap); - va_end(ap); + /*Allocate space for the new text by using trick from C99 standard section 7.19.6.12 */ + uint32_t len = lv_vsnprintf(NULL, 0, fmt, ap); + va_end(ap); #if LV_USE_ARABIC_PERSIAN_CHARS /*Put together the text according to the format string*/ @@ -819,6 +819,8 @@ static lv_design_res_t lv_table_design(lv_obj_t * table, const lv_area_t * clip_ cell_area.y2 = table->coords.y1 + bg_top - 1 - lv_obj_get_scroll_top(table); lv_coord_t scroll_left = lv_obj_get_scroll_left(table); + bool rtl = lv_obj_get_base_dir(table) == LV_BIDI_DIR_RTL ? true : false; + for(row = 0; row < ext->row_cnt; row++) { lv_coord_t h_row = ext->row_h[row]; @@ -827,7 +829,8 @@ static lv_design_res_t lv_table_design(lv_obj_t * table, const lv_area_t * clip_ if(cell_area.y1 > clip_area->y2) return LV_DESIGN_RES_OK; - cell_area.x2 = table->coords.x1 + bg_left - 1 - scroll_left; + if(rtl) cell_area.x1 = table->coords.x2 - bg_right - 1 - scroll_left; + else cell_area.x2 = table->coords.x1 + bg_left - 1 - scroll_left; for(col = 0; col < ext->col_cnt; col++) { @@ -842,15 +845,22 @@ static lv_design_res_t lv_table_design(lv_obj_t * table, const lv_area_t * clip_ format.s.crop = 1; } - cell_area.x1 = cell_area.x2 + 1; - cell_area.x2 = cell_area.x1 + ext->col_w[col] - 1; + if(rtl) { + cell_area.x2 = cell_area.x1 - 1; + cell_area.x1 = cell_area.x2 - ext->col_w[col] + 1; + } + else { + cell_area.x1 = cell_area.x2 + 1; + cell_area.x2 = cell_area.x1 + ext->col_w[col] - 1; + } uint16_t col_merge = 0; for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge++) { if(ext->cell_data[cell + col_merge] != NULL) { format.format_byte = ext->cell_data[cell + col_merge][0]; if(format.s.right_merge) - cell_area.x2 += ext->col_w[col + col_merge + 1]; + if(rtl) cell_area.x1 -= ext->col_w[col + col_merge + 1]; + else cell_area.x2 += ext->col_w[col + col_merge + 1]; else break; } @@ -1042,10 +1052,11 @@ static lv_style_list_t * lv_table_get_style(lv_obj_t * table, uint8_t part) /* Because of the presence of LV_TABLE_PART_BG, LV_TABLE_PART_CELL has an integer value of . This comes in useful to extend above code with more cell types as follows */ - if ( part == LV_TABLE_PART_BG ) { - return &table->style_list; - } else if (part >= 1 && part <= LV_TABLE_CELL_STYLE_CNT ) { - return &ext->cell_style[part-1]; + if(part == LV_TABLE_PART_BG) { + return &table->style_list; + } + else if(part >= 1 && part <= LV_TABLE_CELL_STYLE_CNT) { + return &ext->cell_style[part - 1]; } return NULL; diff --git a/src/lv_widgets/lv_table.h b/src/lv_widgets/lv_table.h index d7dddeec9..69e295931 100644 --- a/src/lv_widgets/lv_table.h +++ b/src/lv_widgets/lv_table.h @@ -32,12 +32,12 @@ extern "C" { #define LV_TABLE_COL_MAX 12 #endif -/* - Maximum allowable value of LV_TABLE_CELL_STYLE_CNT is 16 +/* + Maximum allowable value of LV_TABLE_CELL_STYLE_CNT is 16 because of restriction of lv_table_cell_format_t.type to no more than 4 bits so that lv_table_cell_format_t.s will not exceed 8 bits */ -#ifndef LV_TABLE_CELL_STYLE_CNT +#ifndef LV_TABLE_CELL_STYLE_CNT # define LV_TABLE_CELL_STYLE_CNT 4 #endif #if (LV_TABLE_CELL_STYLE_CNT > 16) diff --git a/tests/lv_test_core/lv_test_font_loader.c b/tests/lv_test_core/lv_test_font_loader.c index 7158d0823..56a42c2d8 100644 --- a/tests/lv_test_core/lv_test_font_loader.c +++ b/tests/lv_test_core/lv_test_font_loader.c @@ -7,12 +7,12 @@ * INCLUDES *********************/ -#include "lvgl/lvgl.h" +#include "../../lvgl.h" #if LV_BUILD_TEST #include "../lv_test_assert.h" -#include "lvgl/src/lv_font/lv_font_fmt_txt.h" -#include "lvgl/src/lv_font/lv_font.h" -#include "lvgl/src/lv_font/lv_font_loader.h" +#include "../src/lv_font/lv_font_fmt_txt.h" +#include "../src/lv_font/lv_font.h" +#include "../src/lv_font/lv_font_loader.h" #include "lv_test_font_loader.h" diff --git a/tests/lv_test_fonts/font_1.c b/tests/lv_test_fonts/font_1.c index e94b63ff3..cb26d658d 100644 --- a/tests/lv_test_fonts/font_1.c +++ b/tests/lv_test_fonts/font_1.c @@ -1,4 +1,4 @@ -#include "lvgl/lvgl.h" +#include "../../lvgl.h" /******************************************************************************* * Size: 8 px diff --git a/tests/lv_test_fonts/font_2.c b/tests/lv_test_fonts/font_2.c index cf2a7b70b..cb20ac794 100644 --- a/tests/lv_test_fonts/font_2.c +++ b/tests/lv_test_fonts/font_2.c @@ -1,4 +1,4 @@ -#include "lvgl/lvgl.h" +#include "../../lvgl.h" /******************************************************************************* * Size: 8 px diff --git a/tests/lv_test_fonts/font_3.c b/tests/lv_test_fonts/font_3.c index 923affa1d..c0dd3cfbb 100644 --- a/tests/lv_test_fonts/font_3.c +++ b/tests/lv_test_fonts/font_3.c @@ -1,4 +1,4 @@ -#include "lvgl/lvgl.h" +#include "../../lvgl.h" /******************************************************************************* * Size: 20 px