Commit graph

12 commits

Author SHA1 Message Date
Daniel Eklöf
ffccabbb13
config: add inheritable option “font-shaping”
This patch adds an inheritable option, “font-shaping”, that controls
whether a particle that renders text should enable font-shaping or
not.

The option works similar to the ‘font’ option: one can set it at the
top-level, and it gets inherited down through all modules and to their
particles.

Or, you can set it on a module and it gets inherited to all its
particles, but not to other modules’ particles.

Finally, you can set it on individual particles, in which case it only
applies to them (or “child” particles).

When font-shaping is enabled (the default), the string particle shapes
full text runs using the fcft_rasterize_text_run_utf32() API. In fcft,
this results in HarfBuzz being used to shape the string.

When disabled, the string particle instead uses the simpler
fcft_rasterize_char_utf32() API, which rasterizes individual
characters.

This gives user greater control over the font rendering. One example
is bitmap fonts, which HarfBuzz often doesn’t get right.

Closes #159
2022-02-23 18:43:13 +01:00
Daniel Eklöf
03a5c8746f
fcft: adjust to fcft-2.0 API changes
* font_*() -> fcft_*()
* struct font -> struct fcft_font
* struct glyph -> struct fcft_glyph
* enum subpixel_order -> enum fcft_subpixel
2020-04-22 11:50:29 +02:00
Daniel Eklöf
51a6631c19
fcft: use fcft instead of local copy of font.{c,h} 2019-12-01 16:00:15 +01:00
Daniel Eklöf
c11fee4ce3
cairo: replace cairo with pixman in decos, particles and modules
All decoration, particle and module interfaces now takes a
pixman_image_t parameter, and all drawing is done using pixman APIs.

The wayland/xcb backends implement a new interface functions,
get_pixman_image(), that should return a pixman image instance that is
suitable for rendering.

In the wayland backend, the image uses the same backing data as the
cairo surface.

In the XCB backend, we create a new image each time, and then blit it
to the cairo surface at commit time.
2019-09-22 01:56:58 +02:00
Daniel Eklöf
5eef162d39 main: add -b,--backend command line option
This option allows the user to explicitly select the backend to
use. The default is still to auto-detect.
2019-05-11 10:53:09 +02:00
Daniel Eklöf
7754ef3661 decorations: are now plugins 2019-01-13 17:43:25 +01:00
Daniel Eklöf
8dc278aaf2 config: pass a struct with inheritable values
For now, font and foreground color
2019-01-13 14:13:14 +01:00
Daniel Eklöf
7b98ea2b7c particle/string: expose info through the new struct particle_info struct 2019-01-13 10:49:10 +01:00
Daniel Eklöf
4dd1a24af6 config: sort includes, add comment 2019-01-12 11:47:30 +01:00
Daniel Eklöf
3c870f759a config: verify: config_verify_bar() -> conf_verify_bar() 2019-01-12 11:47:01 +01:00
Daniel Eklöf
6cb2f52328 config: conf_particle_from() -> conf_to_particle() 2019-01-12 11:28:20 +01:00
Daniel Eklöf
8bf8a398b9 initial commit: wip 2018-11-17 11:30:33 +01:00