react-native-windows 0.82.0-preview.2 → 0.82.0-preview.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1508,18 +1508,26 @@ void WindowsTextInputComponentView::UpdateCharFormat() noexcept {
1508
1508
  cfNew.wWeight =
1509
1509
  props.textAttributes.fontWeight ? static_cast<WORD>(*props.textAttributes.fontWeight) : DWRITE_FONT_WEIGHT_NORMAL;
1510
1510
 
1511
- // set font style
1512
- // cfNew.dwMask |= (CFM_ITALIC | CFM_STRIKEOUT | CFM_UNDERLINE);
1513
- // int dFontStyle = fontDetails.FontStyle;
1514
- // if (dFontStyle & FS_Italic) {
1515
- // cfNew.dwEffects |= CFE_ITALIC;
1516
- // }
1517
- // if (dFontStyle & FS_StrikeOut) {
1518
- // cfNew.dwEffects |= CFE_STRIKEOUT;
1519
- //}
1520
- // if (dFontStyle & FS_Underline) {
1521
- // cfNew.dwEffects |= CFE_UNDERLINE;
1522
- // }
1511
+ // set font style (italic)
1512
+ cfNew.dwMask |= CFM_ITALIC;
1513
+ if (props.textAttributes.fontStyle == facebook::react::FontStyle::Italic ||
1514
+ props.textAttributes.fontStyle == facebook::react::FontStyle::Oblique) {
1515
+ cfNew.dwEffects |= CFE_ITALIC;
1516
+ }
1517
+
1518
+ // set text decoration (underline and strikethrough)
1519
+ cfNew.dwMask |= (CFM_UNDERLINE | CFM_STRIKEOUT);
1520
+ if (props.textAttributes.textDecorationLineType.has_value()) {
1521
+ auto decorationType = *props.textAttributes.textDecorationLineType;
1522
+ if (decorationType == facebook::react::TextDecorationLineType::Underline ||
1523
+ decorationType == facebook::react::TextDecorationLineType::UnderlineStrikethrough) {
1524
+ cfNew.dwEffects |= CFE_UNDERLINE;
1525
+ }
1526
+ if (decorationType == facebook::react::TextDecorationLineType::Strikethrough ||
1527
+ decorationType == facebook::react::TextDecorationLineType::UnderlineStrikethrough) {
1528
+ cfNew.dwEffects |= CFE_STRIKEOUT;
1529
+ }
1530
+ }
1523
1531
 
1524
1532
  // set font family
1525
1533
  if (!props.textAttributes.fontFamily.empty()) {
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.82.0-preview.2</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.82.0-preview.3</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>82</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>4bb47d05de41311659d451b79f33e9a596230dcb</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>7d9a26d50288e3829966de2eeaf36cd6bc83f462</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.82.0-preview.2",
3
+ "version": "0.82.0-preview.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",