clydebarrow / esphome

ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
https://esphome.io/
Other
23 stars 12 forks source link

Font kerning #73

Open nagyrobi opened 7 months ago

nagyrobi commented 7 months ago

kerning - the process of adjusting the spacing between characters in a proportional font, usually to achieve a visually pleasing result. kerning_explained LVGL and lv_font_conv supports it, and built-in fonts seem to use it.

With ESPHome's font renderer, lack of kerning is noticeable: no_kerning See the space between í and c is bigger than the space between i and o simply because the accent of í pushes it to the right. highlight

To reproduce:

  - file: 'fonts/RobotoCondensed-Regular.ttf'
    id: roboto_condensed_20
    size: 20
    bpp: 4
    glyphs: [
      0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,á,Á,é,É,í,Í,ó,Ó,ö,Ö,ő,Ő,ú,Ú,ü,Ü,ű,Ű,\,/,
      (,),+,-,_,.,°,•,µ,
      "\u0020", #space
      "\u0021", #!
      "\u0022", #"
      "\u0025", #%
      "\u0027", #'
      "\u002C", #,
      "\u003A", #:
      "\u003D", #=
      "\u003F", #?
      ]

and put the word pozíció into a label using the font above.

Tangee69 commented 7 months ago

__