mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-27 19:57:02 +00:00
doc: add tip on Fontconfig
For users who want to understand how fonts work under the hood.
This commit is contained in:
committed by
laurensvalk
parent
b5159a850a
commit
f51a25c051
@@ -248,6 +248,25 @@ Fonts
|
||||
.. automethod:: pybricks.media.ev3dev.Font.text_height
|
||||
|
||||
|
||||
.. tip:: Behind the scenes, Pybricks uses Fontconfig_ for fonts. The Fontconfig
|
||||
command line tools can be used to explore available fonts in more
|
||||
detail.
|
||||
|
||||
Example::
|
||||
|
||||
# List available font families.
|
||||
fc-list :scalable=false:dpi=119 family
|
||||
# Perform lookup similar to Font.DEFAULT
|
||||
fc-match :scalable=false:dpi=119:family=Lucida:size=12
|
||||
# Perform lookup similar to Font(size=24,lang=zh-cn)
|
||||
fc-match :scalable=false:dpi=119:size=24:lang=zh-cn
|
||||
|
||||
Pybricks only allows the use of bitmap fonts (``scalable=false``)
|
||||
and the screen on the EV3 has 119 pixels per inch (``dpi=119``).
|
||||
|
||||
.. _FontConfig: https://www.freedesktop.org/wiki/Software/fontconfig/
|
||||
|
||||
|
||||
Image Manipulation
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user