12
June
0

Custom Fonts in LWC App - Salesforce

To use a custom font in your LWC App

  1. Upload your custom font file as a static resource (Use Static Resources Trailhead).
  2. Create a CSS file where you specify the font using @font-face, I used the font-family with * selector (figure 1). 
  3. Upload that CSS file as a static resource.
  4. Load the CSS file in your component.

And you'll see the component where you loaded the style with your custom font.


Figure 1. Custom font definition and use. 


Compartir

Contacto

Alianza 205A interior 4 Jalatlaco, Oaxaca de Juárez, Oaxaca karimnotinc@gmail.com (951) 51-58-556 Lunes a Viernes 9am a 6pm