在 react-native-maps 中为集群文本设置 fontFamily

Set fontFamily for cluster Text in react-native-maps

如何在 react-native-mapsreact-native-map-clustering.

中为 <Text /> 设置 fontFamily
<Marker coordinate={{ ... }} >
    <Text
        style={{
            fontFamily:"IRANSansMobile"
        }}
    >
        {this.props.pointCount}
    </Text>
</Marker>

我用 SVG 解决了这个问题 https://github.com/react-native-community/react-native-svg

<Marker
    coordinate={{ ... }}
    onPress={...} 
>
    <Svg
        width={...} height={...}
    >
        <Text
            x={...}
            y={...}
            fontFamily="IRANSansMobile"
            fontSize={20}
            textAnchor="middle"
            fill={"#fff"}
        >
            {this.props.pointCount}
        </Text>
    </Svg>
</Marker>