Opened 3 years ago
Last modified 2 years ago
#17523 new bug
Incorrect right edge is reported for the characer "U" under Noto Sans Display Italic — at Version 1
Reported by: | hgsfghs | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Interface Kit | Version: | R1/beta3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
Run the following code:
BFont ft; ft.SetSize (52); ft.SetFamilyAndStyle ("Noto Sans Display", "Italic"); const char *str = "U"; float fl; edge_info ei; ft.GetEscapements (str, strlen (str), (float *) &fl); ft.GetEdges (str, strlen (str), (edge_info *) &ei); vw->LockLooper (); vw->SetHighColor (128, 0, 255, 255); vw->SetPenSize (1.0); vw->StrokeRect (BRect (0, 0, (ei.right + fl) * ft.Size (), 30)); vw->MovePenTo (0, 50); vw->SetFont (&ft); vw->SetHighColor (128, 255, 255, 0); vw->DrawString (str); vw->UnlockLooper ();
The cyan text will draw outside the purple rectangle, which is incorrect, since the escapement + right edge should be the right-most pixel that is drawn onto the display.
Thanks.
This happens on R1/Beta3 and also a nightly built from hrev55768. Sorry for not specifying that when creating the ticket, but I don't know how to edit that information after a ticket has been submitted.
Note:
See TracTickets
for help on using tickets.