防止系统字体覆盖本机android中的应用程序字体

防止系统字体覆盖本机android中的应用程序字体,android,react-native,Android,React Native,我需要强制应用程序内的应用程序字体,而不是被系统字体覆盖。即字体大小和字体系列。我还分别在android和iOS的资产和资源中添加了我正在使用的字体 rn:0.42只需将样式添加到文本组件,如: 一些文本 如果您想在应用程序中的任何地方使用相同的样式,只需创建自己的组件: import { Text } from 'react-native'; const MyCustomText = (props) => { const { style, children, ...rest } =

我需要强制应用程序内的应用程序字体,而不是被系统字体覆盖。即字体大小和字体系列。我还分别在android和iOS的资产和资源中添加了我正在使用的字体


rn:0.42

只需将样式添加到
文本
组件,如:
一些文本

如果您想在应用程序中的任何地方使用相同的样式,只需创建自己的组件:

import { Text } from 'react-native';

const MyCustomText = (props) => {
  const { style, children, ...rest } = props;
  return (
    <Text style={[{fontSize: 13}, style]} {...rest}>{children}</Text>
  )
}

export default MyCustomText;
从'react native'导入{Text};
常量MyCustomText=(道具)=>{
const{style,children,…rest}=props;
返回(
{儿童}
)
}
导出默认MyCustomText;

只需将样式添加到
文本
组件,如:
一些文本

如果您想在应用程序中的任何地方使用相同的样式,只需创建自己的组件:

import { Text } from 'react-native';

const MyCustomText = (props) => {
  const { style, children, ...rest } = props;
  return (
    <Text style={[{fontSize: 13}, style]} {...rest}>{children}</Text>
  )
}

export default MyCustomText;
从'react native'导入{Text};
常量MyCustomText=(道具)=>{
const{style,children,…rest}=props;
返回(
{儿童}
)
}
导出默认MyCustomText;

我这样做了,但它仍然被三星s4I上的系统字体覆盖。我这样做了,但它仍然被三星s4上的系统字体覆盖