From 7b68fb57df8317a902559b30097d4fa1a95c377a Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Thu, 11 Jun 2020 00:15:45 +0300 Subject: [PATCH 1/4] Support for lineHeight on Android --- .../mobile/ReactNativeAztec/ReactAztecManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecManager.java b/react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecManager.java index 013b9794ea..c0d0373474 100644 --- a/react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecManager.java +++ b/react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecManager.java @@ -338,6 +338,14 @@ public void setFontStyle(ReactAztecText view, @Nullable String fontStyleString) } } + @ReactProp(name = ViewProps.LINE_HEIGHT, defaultInt = ViewDefaults.LINE_HEIGHT) + public void setLineHeight(ReactAztecText view, int lineHeight) { + // setLineHeight is not available on API 21 (the current app minimum) so, + // go with setLineSpacing instead, by using this formula: + // (font-size) * (line-height multiplier) = (line-height value) + view.setLineSpacing(0, 1.0f * lineHeight / PixelUtil.toSPFromPixel(view.getTextSize())); + } + /** * This code was taken from the method parseNumericFontWeight of the class ReactTextShadowNode * TODO: Factor into a common place they can both use From dc3e1f33fe089695dcfbbb1125fc58eedd23d135 Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Thu, 11 Jun 2020 00:16:39 +0300 Subject: [PATCH 2/4] Bump hash to default fontSize 16, lineSpacing 1.6 --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 1497b52cec..2780089fd2 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 1497b52cec2ee55a4b79c4c2217f9d19537fc62c +Subproject commit 2780089fd2aabe45e60baf7e133372aa444ceffb From 8ffa85473b0eebd664c0bd7277e2ee21da17453c Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Thu, 11 Jun 2020 01:37:41 +0300 Subject: [PATCH 3/4] Update release notes with the typographic rhythm change --- RELEASE-NOTES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index eefdcb3e61..6c270b209f 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,3 +1,7 @@ +1.31.0 +------ +* [**] More spacious basic typographic rhythm + 1.30.0 ------ * [**] Adds editor support for theme defined colors and theme defined gradients on cover and button blocks. From d31e3c897e72789cfbbab123ae13c7e1524bfe55 Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Thu, 11 Jun 2020 12:16:14 +0300 Subject: [PATCH 4/4] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 2780089fd2..388f575c5d 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 2780089fd2aabe45e60baf7e133372aa444ceffb +Subproject commit 388f575c5d7ca594b0d4d374d8535de987d5226d