Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

192
Vistas
React Native FontFamily Bold y el color globalmente no funcionan

Tengo un problema en el que la font-family no funciona en mi aplicación, especialmente al aplicar texto en negrita. Ya coloqué toda mi fuente en mi android/app/src/main/assets/fonts y ejecuté el comando react-native link

./constantes/tema.js

 import { Dimensions } from "react-native"; const { width, height } = Dimensions.get("window"); export const FONTS = { h1: { fontFamily: "Roboto-Black", fontSize: SIZES.h1, lineHeight: 36 }, h2: { fontFamily: "Roboto-Bold", fontSize: SIZES.h2, lineHeight: 30 }, h3: { fontFamily: "Roboto-Bold", fontSize: SIZES.h3, lineHeight: 22 }, h4: { fontFamily: "Roboto-Bold", fontSize: SIZES.h4, lineHeight: 22 }, body1: { fontFamily: "Roboto-Regular", fontSize: SIZES.body1, lineHeight: 36 }, body2: { fontFamily: "Roboto-Regular", fontSize: SIZES.body2, lineHeight: 30 }, body3: { fontFamily: "Roboto-Regular", fontSize: SIZES.body3, lineHeight: 22 }, body4: { fontFamily: "Roboto-Regular", fontSize: SIZES.body4, lineHeight: 22 }, body5: { fontFamily: "Roboto-Regular", fontSize: SIZES.body5, lineHeight: 22 }, }; export const COLORS = { primary: "#7F5DF0", // Light purple secondary: "#5D2DFD", // Dark purple white: "#fff", black: "#000000", green: "#37E39F", red: "#F9A8BA", gray: "#6A6A6A", lightGray: "#dbdbdb", lightGray1: "#f5f6fa" }; export const SIZES = { // global sizes base: 8, font: 14, radius: 12, padding: 24, // font sizes h1: 30, h2: 22, h3: 16, h4: 14, body1: 30, body2: 22, body3: 16, body4: 14, body5: 12, // app dimensions width, height }; const appTheme = { COLORS, SIZES, FONTS }; export default appTheme;

Y cuando lo devuelvo cuando uso ...FONTS.h3 el texto no estaba en negrita a pesar de que declaré texto en negrita

 import {COLORS, FONTS} from '../constants'; <View> <Text style={{...FONTS.h3, ...COLORS.green}}>Text with bold and green color</Text> </View>

./contants/index.js

 import icons from "./icons"; import images from "./images"; import theme, { COLORS, SIZES, FONTS } from "./theme"; export { icons, images, theme, COLORS, SIZES, FONTS };
about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda