Opened 9 years ago

Closed 5 years ago

Last modified 4 years ago

#11478 closed bug (fixed)

[Terminal] Fonts not drawing properly when hinting is disabled

Reported by: KapiX Owned by: jackburton
Priority: normal Milestone: R1/beta2
Component: Applications/Terminal Version: R1/Development
Keywords: fonts terminal Cc:
Blocked By: Blocking: #12093
Platform: All

Description (last modified by diver)

When hinting is disabled, fonts are a bit wider but Terminal seems to be unaware of that (even if it is started with hinting already disabled).

I'm attaching two screenshots: 1) Hinting disabled

2) Hinting enabled

Attachments (3)

screenshot1.png (26.1 KB ) - added by KapiX 9 years ago.
screenshot2.png (9.3 KB ) - added by KapiX 9 years ago.
Immagine.png (303.8 KB ) - added by jackburton 5 years ago.

Download all attachments as: .zip

Change History (12)

by KapiX, 9 years ago

Attachment: screenshot1.png added

by KapiX, 9 years ago

Attachment: screenshot2.png added

comment:1 by jackburton, 9 years ago

Blocking: 12093 added

(In #12093) Duplicate of #11478

comment:2 by diver, 9 years ago

Description: modified (diff)

comment:3 by jackburton, 5 years ago

I think this is an app-server or interface kit bug, since also PE is affected by this. Just try to write a long line in PE and it'll show.

comment:4 by jackburton, 5 years ago

Interestingly, this does not happen with the "Ubuntu mono" font, but it does with the "Noto" font.

comment:5 by jackburton, 5 years ago

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).

by jackburton, 5 years ago

Attachment: Immagine.png added

comment:6 by jackburton, 5 years ago

Oh, of course, the latter problem is caused by the fact that I changed the hinting setting with Terminal already running, and it only calculates font width on start.

comment:7 by jackburton, 5 years ago

I added change 821 on gerrit which fixes this ticket.

https://review.haiku-os.org/c/haiku/+/821

comment:8 by waddlesplash, 5 years ago

Resolution: fixed
Status: newclosed

Change merged in hrev52707.

comment:9 by nielx, 4 years ago

Milestone: R1R1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.