[haiku-bugs] Re: [Haiku] #11478: [Terminal] Fonts not drawing properly when hinting is disabled

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 30 Dec 2018 21:18:41 -0000

#11478: [Terminal] Fonts not drawing properly when hinting is disabled
-------------------------------------+----------------------------
   Reporter:  KapiX                  |      Owner:  jackburton
       Type:  bug                    |     Status:  new
   Priority:  normal                 |  Milestone:  R1
  Component:  Applications/Terminal  |    Version:  R1/Development
 Resolution:                         |   Keywords:  fonts terminal
 Blocked By:                         |   Blocking:  12093
Has a Patch:  0                      |   Platform:  All
-------------------------------------+----------------------------

Comment (by jackburton):

 I think I found the problem(s):

 I made TermView print the font width on start, and with hinting enabled,
 it's an integer.
 Without hinting, it's a decimal value. But TermView stores it into an int.
 Given that _DrawLinePart() also uses integers to draw the text, the longer
 the text line, the higher the error. Using a float for fFontWidth and in
 _DrawLinePart() fixes the problem.
 Now, though, there's a small problem with hinting enabled (look at the
 image on the right).

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/11478#comment:5>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: