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

290
Vistas
Custom font won't be used on chromebook but works fine in (mac) chrome

Got this little project where I inject a weather widget into google calendar. I wish to use a google font with the widget. My attempt with an npm package (previous commits) worked fine in chrome (on a mac), but not on the chromebook tablet that I want to use it on.

I then changed tactic to inject a link tag like this

console.log('Weather widget extension for google calendar executing')

document.addEventListener('DOMContentLoaded', function(event) {
  console.log({ event })

  const linkElement = document.createElement('link')
  linkElement.rel = 'stylesheet'
  linkElement.href = 'https://fonts.googleapis.com/css?family=Gemunu+Libre'
  document.head.appendChild(linkElement)
  console.log({ linkElement })

  const mainDiv = document.createElement('div')
  mainDiv.className = 'weather-widget__main'
  mainDiv.setAttribute(
    'style',
    `position: absolute;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  background: linear-gradient(145deg, #024acf0a, #0721d74f);
  opacity: 70%;
  padding: 10px;
  border: 1px solid #0721d74f;
  box-shadow: 0px 0px 10px #0721d74f;
  border-radius: 10px;
  font-family: Gemunu Libre, Roboto;
`
  )
  document.body.appendChild(mainDiv)
...

this also works in chrome but not on the chromebook?


Not that it is relevant but I'm writing it in typescript and using vite with a plugin to build it. If you want to use it you have make a .env file

.env

VITE_API_KEY=<your openweathermap api key>
VITE_LAT=<your lattitude>
VITE_LON=<your longitude>

run yarn build and load the dist folder as a local extension in chrome.

Solution

Setting the custom font by inline styling in each block seem to do the trick 👍

(Doing font-family: inherit; did not work)

about 4 years ago · Juan Pablo Isaza
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