I installed a moodle font (Coptic) in my Moodle Course and Theme and it displays correctly in Google Chrome. However when I try to view it in Firefox, I.E. or on my Tablet (Chrome via Nexus 9) it doesn't display the correct characters.

我在我的Moodle课程和主题中安装了moodle字体(Coptic),它在Google Chrome中正确显示。但是,当我尝试在Firefox中查看它时,I.E。或者在我的平板电脑(Chrome通过Nexus 9)上,它不会显示正确的字符。

Ifollowed these instructions before https://docs.moodle.org/28/en/How_to_add_custom_fonts_in_a_theme. The only thing is, before I only had Coptic.tff and no other font types. I.e. eot or svg. I then went online to get the other fonts. I.e. I uploaded Coptic.tff and got a zip of the other files. By including these other fonts in the dir. do you think it might fix the problem. Thanks for all you help. :-)

我在https://docs.moodle.org/28/en/How_to_add_custom_fonts_in_a_theme之前按照这些说明操作。唯一的问题是,在我只有Coptic.tff而没有其他字体类型之前。即eot或svg。然后我上网获取其他字体。即我上传了Coptic.tff并获得了其他文件的压缩文件。通过在dir中包含这些其他字体。你认为它可能解决问题吗?谢谢你的帮助。 :-)

1 个解决方案

#1


2

Please include all fonts type like you did. Create a new directory in your theme and call it fonts. Then add all your custom fonts into this directory. eg: moodle/theme/yourtheme/fonts/

请包括您所做的所有字体类型。在主题中创建一个新目录并将其称为字体。然后将所有自定义字体添加到此目录中。例如:moodle / theme / yourtheme / fonts /

Some times " src: url([[font:theme|fontname.eot]]); ", this may not work.

有时候“src:url([[font:theme | fontname.eot]]);”,这可能行不通。

Please add path like this

请添加这样的路径

@font-face { /* where FontName and fontname represents the name of the font you want to add */
 font-family: 'fontname';
 src: url('../theme/your-theme-name/fonts/fontname.woff');
 src: url('../theme/your-theme-name/fonts/fontname.eot') format('embedded-opentype'),
      url('../theme/your-theme-name/fonts/fontname.woff') format('woff'),
      url('../theme/your-theme-name/fonts/fontname.ttf') format('truetype'),
      url('../theme/your-theme-name/fonts/fontname.svg') format('svg');
 font-weight: normal;
 font-style: normal;

}

Next ADD the name of your font wherever you want that font to be used in your stylesheet. For example: #page-header h1 { font-family: FontName;}

接下来,只要在样式表中使用该字体,就可以添加字体名称。例如:#page-header h1 {font-family:FontName;}

try !!! It will work for you :)

试试!!!它会适合你:)

更多相关文章

  1. 上传文件,那么form中用来接收文件的数据成员是什么类型?
  2. 一天搞定HTML----标签类型与类型转换05
  3. css字体大小在苹果邮件中比gmail (iphone)要小
  4. 如何捕获PHP类型暗示的“可捕获的致命错误”?
  5. 有没有办法在PDO中设置默认游标类型(特别是PDO_SQLSRV)?
  6. PHP变量类型+整型类型细节
  7. 用于cdn集成的文件类型的域更改正则表达式
  8. java获取MySQL自动的int类型的Id
  9. MYSQL SET类型字段的SQL查询某个字段保函某个值的查询

随机推荐

  1. 学习linux几本不错的书
  2. linux设置时间和把时间从UTC转成本地时间
  3. mysqk 5.7官方安装指导,比一般有效
  4. Linux&C网络编程————“聊天室”
  5. Linux内核构建系统之一
  6. Linux 下部署Django项目
  7. 如何使用ffmpeg将m4v和wmv视频转换为mp4
  8. Userspace RCU 安装过程记录
  9. linux c 网络编程, 常用网络函数,范例
  10. Linux 多线程 ”一写多读” 模式下的无锁