Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

167
Visualizações
Use different fonFamilly in the same line of text, in React native

I need to apply in a sentence two different fontFamily.

In the phrase "String1: second String", I need "string1:" to be semibold, and "second String" is regular.

<Text
  style={[
    { color: colors.black, fontFamily: 'Montserrat-SemiBold' },
  ]}>
  String1:
  <Text
    style={[
      { color: colors.black, fontFamily: 'Montserrat-Regular' },
    ]}>
    second String
  </Text>
</Text>

The result of the above code puts all text to semibold.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

For this question I needed in React-Native to make a sentence have two different fontFamily. For this we created a to make the line of text and within that component we put the sentence divided with the different fontFamily. The end result is what is in the image, and the solution the code below.

desired result

Solution is...

<Text>
 <Text
   style={[
     { color: colors.black, fontFamily: 'Montserrat-SemiBold' },
   ]}>
    String1:
   </Text>
   <Text
     style={[
       { color: colors.black, fontFamily: 'Montserrat-Regular' },
     ]}>
     second String
   </Text>
 </Text>

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda