You will have to create your own custom matchers since Espresso does not support any of these matchers by default.
Luckily this can be done quite easily. Take a look at this example for font size:
public class FontSizeMatcher extends TypeSafeMatcher<View> {
private final float expectedSize;
public FontSizeMatcher(float expectedSize) {
super(View.class);
this.expectedSize = expectedSize;
}
@Override
protected boolean matchesSafely(View target) {
if (!(target instanceof TextView)){
return false;
}
TextView targetEditText = (TextView) target;
return targetEditText.getTextSize() == expectedSize;
}
@Override
public void describeTo(Description description) {
description.appendText("with fontSize: ");
description.appendValue(expectedSize);
}
}
Then create an entrypoint like so:
public static Matcher<View> withFontSize(final float fontSize) {
return new FontSizeMatcher(fontSize);
}
And use it like this:
onView(withId(R.id.editText1)).check(matches(withFontSize(36)));
For width & height it can be done in a similar manner.