Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font kerning #73

Open
nagyrobi opened this issue Feb 15, 2024 · 1 comment
Open

Font kerning #73

nagyrobi opened this issue Feb 15, 2024 · 1 comment

Comments

@nagyrobi
Copy link

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
Copy link

__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants