@@ -82,14 +82,24 @@ def onResume(self, screen):
8282 title .set_text ("ShowFonts" )
8383
8484 resume_start = self ._now_ms ()
85+
8586 emojilabel = lv .label (screen )
8687 emojifont = FontManager .getFont (size = 16 , emoji = True )
87- print ("emoji font height: " , emojifont .get_line_height ())
88+ print ("emoji font height: " , emojifont .get_line_height ()) # 16 gives height 20
8889 emojilabel .set_style_text_font (emojifont , lv .PART .MAIN )
89- text = "👍 👍🏻" # neutral thumbs up, light thumbs up
90+ text = "😊 "
91+ text += "👍 👍🏻" # neutral thumbs up, light thumbs up
9092 text += "🤦 🤦🏻 🤦♀️ 🤦🏻♀️" # neutral facepalm, light facepalm, neutral woman facepalm, light woman facepalm
9193 emojilabel .set_text (text )
9294
95+ emojilabel2 = lv .label (screen )
96+ emojifont2 = FontManager .getFont (size = 30 , emoji = True ) # 32 givs height 33 is the maximum because Montserrat 28 is the maximum (TTF can go bigger)
97+ print ("emoji2 font height: " , emojifont2 .get_line_height ())
98+ emojilabel2 .set_style_text_font (emojifont2 , lv .PART .MAIN )
99+ text = "test 👍 👍🏻" # neutral thumbs up, light thumbs up
100+ text += "🤦 🤦🏻 🤦♀️ 🤦🏻♀️" # neutral facepalm, light facepalm, neutral woman facepalm, light woman facepalm
101+ emojilabel2 .set_text (text )
102+
93103 self .addAllFontsTitles (screen )
94104 self ._log_timing ("addAllFontsTitles" , resume_start )
95105
@@ -108,7 +118,7 @@ def addAllFontsTitles(self, screen):
108118 import os
109119 ttf_start = self ._now_ms ()
110120 mydir = os .path .dirname (os .path .abspath (__file__ ))
111- self ._ttf_font = FontManager .getFont (size = 42 , ttf = f"M:{ mydir } /Rancourt-SmallCaps.ttf" )
121+ self ._ttf_font = FontManager .getFont (size = 42 , ttf = f"M:{ mydir } /Rancourt-SmallCaps.ttf" , emoji = True )
112122 self ._log_timing ("addAllFontsTitles/getFont TTF" , ttf_start )
113123 #self._ttf_font56 = FontManager.getFont(size=56, ttf=f"M:{mydir}/Rancourt-SmallCaps.ttf")
114124 #self._ttf_font72 = FontManager.getFont(size=72, ttf=f"M:{mydir}/Rancourt-SmallCaps.ttf")
@@ -118,7 +128,7 @@ def addAllFontsTitles(self, screen):
118128 self .labelSelectable (title )
119129 title .set_width (lv .pct (99 ))
120130 title .set_style_text_font (self ._ttf_font , lv .PART .MAIN )
121- title .set_text ("Rancourt 42 TTF test with minimal glyphs" )
131+ title .set_text ("Rancourt 42 TTF test with minimal glyphs 👍 " )
122132
123133 listfonts_start = self ._now_ms ()
124134 fonts = FontManager .listFonts ()
0 commit comments