Note that there are some explanatory texts on larger screens.

plurals
  1. PORoboto inconsistent font height
    primarykey
    data
    text
    <p>I'm currently facing strange problems with Android's font Roboto. At first I had two TextViews in one horizontal LinearLayout, centered both vertically and horizontally. The first TextView was set font Roboto-Black.ttf and the second was Roboto-Light.ttf. Both was set to textSize="12sp", but the one with Roboto-Light.ttf was just a pixel higher then the Roboto-Black.ttf TextView. But it didn't happen when I've set textSize="13sp". So I've created new Android project, just to be sure it's not only in the one application. The result is almost identical, but in this case, textSize="12sp" works as expected but textSize="13sp" doesn't. I've made screenshots to show the issue.</p> <p>12sp works as expected. Top edges align. <img src="https://i.stack.imgur.com/9WgRW.png" alt="image"></p> <p>13sp has this strange behavior. <img src="https://i.stack.imgur.com/1gKx2.png" alt="image"></p> <p>Strange is, that this happens only when I try to mix thin and thick lined variants. When I make one TextView Roboto-Bold.ttf and second Roboto-Black.ttf, result is good. When I try Roboto-Light.ttf and Roboto-Thin.ttf, it also work properly.</p> <p>So I also tried to test this in photoshop and this is what I found:</p> <p><img src="https://i.stack.imgur.com/sj3bL.png" alt="image"></p> <p>It's the same for all fonts from Roboto family, except for the Roboto-Light.ttf. I can also post source code for the layout if needed.</p> <p>Thanks in advance.</p> <p>PS: I'm sorry for the links but due to low reputation (brand new account) I can't post images. Also in the last link i had to remove the "h" from "http", because it didn't allow me more than two links.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload