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 Initial Version

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

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.

Change History (0)

Note: See TracTickets for help on using tickets.