Combinations of letters “fi” and “fl” is not displayed by browsers

烂漫一生 提交于 2019-12-06 15:43:43

Try this against the element in which the fonts are rendering (or body).

body {  
  font-feature-settings: "liga" 1;
}

You might need vendor prefixes:

body  {
  -webkit-font-feature-settings: "liga" 1;
  -moz-font-feature-settings:    "liga" 1;
  -ms-font-feature-settings:     "liga" 1;
  font-feature-settings:         "liga" 1;
}

The features that can be toggled this way (if the font supports them) are..

  • liga: standard ligatures
  • dlig: discretionary ligatures
  • onum: old style figures
  • lnum: lining figures
  • tnum: tabular figures
  • zero: slashed zero
  • frac: fractions
  • sups: superscript
  • subs: subscript
  • smcp: small caps
  • c2sc: small capitals from capitals
  • case: case-sensitive forms
  • hlig: historical ligatures
  • calt: contextual alternates
  • swsh: swashes
  • hist: historical forms
  • ss**: stylistic sets
  • kern: kerning
  • locl: localized forms
  • rlig: required ligatures
  • medi: medial forms
  • init: initial forms
  • isol: isolated forms
  • fina: final forms
  • mark: mark
  • mkmk: mark-to-mark positioning

They can even be combined into one rule like this:

.element {
  font-feature-settings:"liga" 1, "dlig" 1;
}

Common ligatures are activated by default, but some fonts don't support them. Try to disable them with font-feature-settings:"liga" 0; This worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!