• wutao's avatar
    ksv: Fix bold text alignment · 42c724cd
    wutao authored
    The StyledLabel calls two different ctors of Label based on the styled
    range, one with |custom_font| and the other one with |text_style|. The
    two ctors will create labels with different heights, which causes a
    misalignment between normal and bold texts.
    
    This cl adds an ash typography to support semi bold text style to
    emphasize a matched search string. Then the label in the styled range
    will call a same ctor of Label with |text_style| to eliminate the
    difference.
    
    Bug: 1061271
    Test: New unittest
    Change-Id: I5b7415ef3b7bd06c5ad296fe9e5211ddd18685ea
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108061
    Commit-Queue: Tao Wu <wutao@chromium.org>
    Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
    Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
    Reviewed-by: default avatarTao Wu <wutao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#751222}
    42c724cd
ash_typography.cc 869 Bytes