Hacker News new | past | comments | ask | show | jobs | submit login

Actually now that I look at it again it's mostly the icons that aren't rendering nicely. I've got OpenDyslexic installed in the OS and then set as the font in firefox setting but for what ever reason "up arrow", "down arrow", etc are rendering at text instead of icons. Any tips to fix this?



Hi, sorry I missed this - I seemed to misunderstand the question. There's a simple fix that I guess I might now make an extension either today or tomorrow depending when I have free time.

Here's how you could do it on your own, this is for the google cloud docs reference https://cloud.google.com/compute/docs/apis.

Note you have to allow pages to set their own fonts in firefox if you use this option

0. Open up your console in dev-tools (F12).

1. Load Jquery (Give it a second, let the script load)

  var jq = document.createElement('script');
  jq.src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js";
  document.getElementsByTagName('head')[0].appendChild(jq);
2. See all the font-families the page is using

  fontSets = new Set();
  $('*').each( function() {
    fontSets.add( $(this).css("font-family"))
  });
  console.log(fontSets)

for google cloud docs this reveals:

  Set(7) [ 
    "Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif", 
    "\"Material Icons\"", 
    "Google Sans, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif", 
    "Roboto, RobotoDraft, Arial, sans-serif", 
    "Roboto, RobotoDraft, Helvetica, Arial, sans-serif", 
    "Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif", 
    "Material Icons"]
3. Make an educated guess, I guess its probably Material Icons that OpenDyslexic is messing up, so lets update all the font-families that don't contain Material Icons

  $('*').each( function() {
    if ( $(this).css("font-family").indexOf("Material Icons") === -1)
      $(this).css("font-family",`OpenDyslexic, ${$(this).css("font-family")}`);
  });




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: