Try   HackMD

解決 Linux Mint 上 HackMD 網頁等寬字體問題

日期:2019/12/13
作者:王一哲


我在 Linux Mint 19.1 Cinnamon 上使用 Chrome 瀏覧器開啟 HackMD 網站時,程式碼的部分沒有辦法使用等寬字體顯示,這樣很難看清楚縮排的格數,今天剛好遇到一個高手學生幫我解決了這個問題。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
無法使用等寬字體顯示程式碼

先在程式碼區段按滑鼠右鍵開啟快速選單,點選最下方的檢查

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

開啟快速選單

在右方的空格中搜尋font-family,找到使用的字體名稱為Menlo

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

搜尋font-family

由於我的電腦中沒有安裝Menlo字體,應該只要安裝好字體就能解決這個問題,於是我上網搜尋,在這個網站找到字體:https://www.cufonfonts.com/font/menlo

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

https://www.cufonfonts.com/font/menlo

下載的字體檔案是zip檔,解壓縮後的檔名為Menlo-Regular.ttf,在檔案上點滑鼠左鍵兩下安裝字體,安裝好的字體位於 /home/$USER/.local/share/fonts/ 。關掉 Chrome 之後再開啟,就可以順利使用等寬字體顯示程式碼。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
修正後的程式碼區段


tags:Linux