open3d.visualization.gui.FontDescription¶
-
class
open3d.visualization.gui.
FontDescription
¶ Class to describe a custom font
-
__init__
(self: open3d.cpu.pybind.visualization.gui.FontDescription, typeface: str = 'sans-serif', style: open3d.cpu.pybind.visualization.gui.FontStyle = FontStyle.NORMAL, point_size: int = 0) → None¶ Creates a FontDescription. ‘typeface’ is a path to a TrueType (.ttf), TrueType Collection (.ttc), or OpenType (.otf) file, or it is the name of the font, in which case the system font paths will be searched to find the font file. This typeface will be used for roman characters (Extended Latin, that is, European languages
-
add_typeface_for_code_points
(self: open3d.cpu.pybind.visualization.gui.FontDescription, arg0: str, arg1: List[int]) → None¶ Adds specific code points from the typeface. This is useful for selectively adding glyphs, for example, from an icon font.
-
add_typeface_for_language
(self: open3d.cpu.pybind.visualization.gui.FontDescription, arg0: str, arg1: str) → None¶ - Adds code points outside Extended Latin from the specified typeface. Supported languages are:
‘ja’ (Japanese) ‘ko’ (Korean) ‘th’ (Thai) ‘vi’ (Vietnamese) ‘zh’ (Chinese, 2500 most common characters, 50 MB per window) ‘zh_all’ (Chinese, all characters, ~200 MB per window)
All other languages will be assumed to be Cyrillic. Note that generally fonts do not have CJK glyphs unless they are specifically a CJK font, although operating systems generally use a CJK font for you. We do not have the information necessary to do this, so you will need to provide a font that has the glyphs you need. In particular, common fonts like ‘Arial’, ‘Helvetica’, and SANS_SERIF do not contain CJK glyphs.
-
MONOSPACE
= 'monospace'¶
-
SANS_SERIF
= 'sans-serif'¶
-