Opened 5 years ago

Closed 10 months ago

#11478 closed bug (fixed)

[Terminal] Fonts not drawing properly when hinting is disabled

Reported by: KapiX Owned by: jackburton
Priority: normal Milestone: R1
Component: Applications/Terminal Version: R1/Development
Keywords: fonts terminal Cc:
Blocked By: Blocking: #12093
Has a Patch: no 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 5 years ago.
screenshot2.png (9.3 KB ) - added by KapiX 5 years ago.
Immagine.png (303.8 KB ) - added by jackburton 10 months ago.

Download all attachments as: .zip

Change History (11)

by KapiX, 5 years ago

Attachment: screenshot1.png added

by KapiX, 5 years ago

Attachment: screenshot2.png added

comment:1 by jackburton, 4 years ago

Blocking: 12093 added

(In #12093) Duplicate of #11478

comment:2 by diver, 4 years ago

Description: modified (diff)

comment:3 by jackburton, 10 months 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, 10 months ago

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

comment:5 by jackburton, 10 months 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, 10 months ago

Attachment: Immagine.png added

comment:6 by jackburton, 10 months 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, 10 months ago

I added change 821 on gerrit which fixes this ticket.

comment:8 by waddlesplash, 10 months ago

Resolution: fixed
Status: newclosed

Change merged in hrev52707.

Note: See TracTickets for help on using tickets.