From f2944cd61b84913c6c821594b289e7af9746efff Mon Sep 17 00:00:00 2001 From: Seigo Nonaka Date: Mon, 2 Apr 2018 11:45:34 -0700 Subject: [PATCH] Add common weight name to the API description Bug: 76448718 Test: m docs Change-Id: Id0ce0b2bcbf4f6b0cf1aa97c4d2c3c5117dc62c2 --- graphics/java/android/graphics/Typeface.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index 20c22b7207170..18dd97f8acef7 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -738,6 +738,23 @@ public class Typeface { /** * Creates a typeface object that best matches the specified existing typeface and the specified * weight and italic style + *

Below are numerical values and corresponding common weight names.

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
ValueCommon weight name
100Thin
200Extra Light
300Light
400Normal
500Medium
600Semi Bold
700Bold
800Extra Bold
900Black
* *

* This method is thread safe. @@ -749,6 +766,9 @@ public class Typeface { * @param italic {@code true} if italic style is desired to be drawn. Otherwise, {@code false} * @return A {@link Typeface} object for drawing specified weight and italic style. Never * returns {@code null} + * + * @see #getWeight() + * @see #isItalic() */ public static @NonNull Typeface create(@Nullable Typeface family, @IntRange(from = 1, to = 1000) int weight, boolean italic) {