Font capabilities currently indicate whether font data is packed
horizontally or vertically, and this is used to control frame buffer
updates. The font bit ordering should likewise be recorded in the font
description, and any reversal to match the display applied when text is
being set in the frame buffer.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
ftpr assignment is being done before checking fb->fonts pointer.
Just changing assignment position.
Fixes 23299 [1]
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.
There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.
The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).
Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.
Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.
Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.
The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.
(Everything above is true for choices, menus, and comments as well.)
Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use this short header style in all Kconfig files:
# <description>
# <copyright>
# <license>
...
Also change all <description>s from
# Kconfig[.extension] - Foo-related options
to just
# Foo-related options
It's clear enough that it's about Kconfig.
The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)
git ls-files '*Kconfig*' | \
xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The content of subsys/fb/cfb_fonts cannot be replicated by the existing
script due to lack of positioning options and use of a full-color frame
buffer, which affects the generated bitmap. Switch to the solution used
in the original script, add the required options, and document the
process of regenerating the fonts.
This commit also determines the required bounding box for the glyphs to
be sure that the user-provided value is sufficient to avoid partial
characters. Ideally the calculated width and height would be used for
font characters, but this would require significant restructuring of the
script to make calculated values available at the point where the
arguments are used to produce output.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The specified order of fields wastes space when the cfb_font_caps enum
isn't packed. Reorder to avoid this behavior.
Also remove the unnecessary array size on the extern symbol declaration,
lest the compiler misinterpret the properties as being zero-length
arrays rather than pointers. (The idiom is already technically
using undefined behavior since we're relying on the linker rather than
the language to produce an array from the individual declarations.)
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It is planned to deprecate SHELL_CREATE_STATIC_SUBCMD_SET macro
which is replaced by SHELL_STATIC_SUBCMD_SET_CREATE.
Additionally, removed irrelevant comments about alphabetical
ordering which is no longer needed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
As this was written before, a 'Framebuffer' menu entry was present,
and to see what kind of features or configuration it had, one had to
navigate into the menu to determine if anything related to
'Framebuffer' was enabled at all.
Now there is an unchecked box on the 'framebuffer' menu when it is
disabled, which clearly expresses that it is disabled without the need
to enter the menu entry.
This change only changes the menu layout, and not the dependencies of
any options.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Clear SSD1673 display during display driver initialization instead of
triggering clear via setting contrast.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Set width, height and pitch dimensions in character framebuffer before
calling display write API.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Add monochrome character framebuffer for monochrome
graphic dot matrix displays and electrophoretic displays.
These displays are mostly monochrome and can only display
black and some other color, for example white. Typically,
a byte controls 8 pixels, arranged vertically or horizontally
depending on the controller or settings.
The API is not suitable to display graphics, the purpose is
to display text or symbols. It is possible to use several fonts.
A font can also consist of graphic symbols only and thus,
for example, enable the realization of a menu.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>