question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

font not applied to all of my components

See original GitHub issue
Package Version
@eva-design/eva 1.4.0
@ui-kitten/components 4.4.0

Hi I followed the tutorials on how to implement and add fonts, but the font does not apply to some components. For example, fonts do not apply to buttons.

app.tsx:

import React from 'react';
import { ApplicationProvider, IconRegistry } from '@ui-kitten/components';
import { EvaIconsPack } from '@ui-kitten/eva-icons';
import { mapping } from '@eva-design/eva';
import { default as customMapping } from './custom-mapping.json';
import { lightTheme, darkTheme } from './custom-theme';

import { AppNavigator } from './src/navigation/navigation.component';
import { ThemeContext } from './theme-context';


const App = () => {
  return (

    <React.Fragment>
      <IconRegistry icons={EvaIconsPack} />
      <ThemeContext.Provider value={{ theme, toggleTheme }}>
        <ApplicationProvider
          mapping={mapping}
          theme={lightTheme}
          customMapping={customMapping}
          >
          <AppNavigator />
        </ApplicationProvider>
      </ThemeContext.Provider>
    </React.Fragment>
  );
};

export default App;

custom-mapping.json:

{
  "strict": {
    "text-font-family": "bad_bold_college"
  }
}

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:18

github_iconTop GitHub Comments

4reactions
DomenicJahncommented, Jan 18, 2022

I just added an empty

"components": {},

so the mapping gets accepted within TS.

4reactions
radihuqcommented, Jun 21, 2020

Try

<ApplicationProvider
      {...eva}
      customMapping={merge(eva.mapping, mapping)}
      theme={{ ...eva.dark, ...theme }}>
      <NavigationContainer>
        <DrawerNavigator />
      </NavigationContainer>

alternatively,

customMapping={{...eva.mapping, mapping}}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Font is loaded but not applicated - Stack Overflow
I use the Roboto font in my React project and I have a strange problem, when I access my application locally the font...
Read more >
Basic Features: Font Optimization - Next.js
When a font function is called on a page of your site, it is not globally available and preloaded on all routes. Rather,...
Read more >
Manage missing fonts – Figma Help Center
The missing fonts modal allows you to quickly update affected text layers. You can use this approach to select an alternative font to...
Read more >
Custom Fonts Not Displaying On Front End - Elementor
Learn everything about Custom Fonts Not Displaying On Front End in this article from Elementor's Knowledge Base. Get Elementor tips & more.
Read more >
Custom fonts - Expo Documentation
Learn about using custom fonts, supported font formats for each platform and ... a custom font, your best bet is to use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found