From b0fc515bc86a6ad6ea553e70320bbbad4310121b Mon Sep 17 00:00:00 2001 From: Misael dos Santos <47726159+misaelbs@users.noreply.github.com> Date: Thu, 12 Mar 2020 14:35:00 -0300 Subject: [PATCH 1/2] fix: fontWeight = bold instead fontWeight = 500 https://github.com/jsdf/react-native-htmlview/issues/276 --- HTMLView.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/HTMLView.js b/HTMLView.js index d8598b8..9c7c3de 100644 --- a/HTMLView.js +++ b/HTMLView.js @@ -20,15 +20,15 @@ const baseStyles = StyleSheet.create({ pre: codeStyle, code: codeStyle, a: { - fontWeight: '500', + fontWeight: 'bold', color: '#007AFF', }, - h1: {fontWeight: '500', fontSize: 36}, - h2: {fontWeight: '500', fontSize: 30}, - h3: {fontWeight: '500', fontSize: 24}, - h4: {fontWeight: '500', fontSize: 18}, - h5: {fontWeight: '500', fontSize: 14}, - h6: {fontWeight: '500', fontSize: 12}, + h1: {fontWeight: 'bold', fontSize: 36}, + h2: {fontWeight: 'bold', fontSize: 30}, + h3: {fontWeight: 'bold', fontSize: 24}, + h4: {fontWeight: 'bold', fontSize: 18}, + h5: {fontWeight: 'bold', fontSize: 14}, + h6: {fontWeight: 'bold', fontSize: 12}, }); const htmlToElementOptKeys = [ From fd55f6095ed93730ad77c8eaf6925d030b341d9e Mon Sep 17 00:00:00 2001 From: Misael dos Santos <47726159+misaelbs@users.noreply.github.com> Date: Thu, 12 Mar 2020 14:41:02 -0300 Subject: [PATCH 2/2] fix: fontWeight = bold instead fontWeight = 500 --- HTMLView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HTMLView.js b/HTMLView.js index 9c7c3de..43f8b7e 100644 --- a/HTMLView.js +++ b/HTMLView.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import htmlToElement from './htmlToElement'; import {Linking, Platform, StyleSheet, View, ViewPropTypes} from 'react-native'; -const boldStyle = {fontWeight: '500'}; +const boldStyle = {fontWeight: 'bold'}; const italicStyle = {fontStyle: 'italic'}; const underlineStyle = {textDecorationLine: 'underline'}; const strikethroughStyle = {textDecorationLine: 'line-through'};