為Joomla AS Menu 換上Google 線上字型

  Joomla預設的中文字型原則上只有細明體跟楷體,若要改變字型可能就要使用圖片的方式,但在選單部份我想保有滑鼠移過時會改變字體顏色的功能,因此便著手研究讓AS Menu改使用Google字型。


1. 首先先到Google字型網站,搜尋”Chinese”,找到想要的字型,這邊以”cwTeXYen (圓體)”為例。


2. 到網站目錄,找到”../modules/mod_as_menu/css”底下的ext.default.css,開啟並在最上方加入以下程式:

@import url(//fonts.googleapis.com/earlyaccess/cwtexyen.css);



3. 找到”../modules/mod_as_menu”底下的mod_as_menu.xml,搜尋任一個既有的字型名稱,在適當的位置加入以下程式碼:

<option value="cwTeXYen, sans-serif">cwTeXYen, sans-serif</option>



4. 接著便能夠在「Joomla後台」-「擴充套件」-「模組」-「欲修改的AS Menu 模組」-「Menu Options」的”Font Family”下拉式選單中找到剛剛新增的”cwTeXYen, sans-serif”字型。


5. 儲存後前台選單字型即會改為圓體。

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.