font-face

Using @fontface fonts load italic

佐手、 提交于 2021-01-27 05:49:08
问题 I have css like so: @font-face { font-family: 'alegreya'; src:url('fonts/AlegreyaBold.ttf'); font-weight:normal; font-style: normal; } @font-face { font-family: 'alegreya'; src:url('fonts/AlegreyaBoldItalic.ttf'); font-weight:normal; font-style: italic, oblique; } @font-face { font-family: 'alegreya'; src:url('fonts/AlegreyaBlack.ttf'); font-weight:bold; font-style: normal; } @font-face { font-family: 'alegreya'; src:url('fonts/AlegreyaBlackItalic.ttf'); font-weight:bold; font-style: italic,

How do I load local fonts with @rails/webpacker?

你说的曾经没有我的故事 提交于 2020-12-29 12:37:46
问题 I’m having an issue loading local font files with @rails/webpacker . The fonts are loaded in the development environment but not in the production environment. It seems like a really simple issue but I have just had so much trouble with it. Below is my @font-face code. My fonts are stored in app/assets/images/fonts app > assets > stylesheets >config > _fonts.scss @font-face { font-family: "Axiforma"; src: url("fonts/Kastelov-AxiformaRegular.eot"); /* IE9 Compat Modes */ src: url("fonts

What is the difference between Variable fonts and regular fonts

泪湿孤枕 提交于 2020-12-29 07:01:50
问题 I was reading about variable fonts and I don't get the concept. There are 5 registered axes wght, wdth, ital, slnt, opsz. Font weight already pre-existed and we use it daily in our css. So what is the difference here between a variable font and a regular font? Also, if I put a range of font-weight: 100 500 and then use font-weight: 600 in <p> elements, I don't see any difference. The weight 600 continues to work even tho I have limited it to 500. @font-face { font-family: "sketch_3dregular";

What is the difference between Variable fonts and regular fonts

南楼画角 提交于 2020-12-29 06:59:46
问题 I was reading about variable fonts and I don't get the concept. There are 5 registered axes wght, wdth, ital, slnt, opsz. Font weight already pre-existed and we use it daily in our css. So what is the difference here between a variable font and a regular font? Also, if I put a range of font-weight: 100 500 and then use font-weight: 600 in <p> elements, I don't see any difference. The weight 600 continues to work even tho I have limited it to 500. @font-face { font-family: "sketch_3dregular";

Can I use CSS “unicode-range” to specify a font across an entire (third party) page?

核能气质少年 提交于 2020-12-25 04:45:26
问题 I've never become fluent with CSS but I don't think I had this situation before. I'm thinking of using stylish to add CSS to a third-party site over which I have no direct control. So the HTML and CSS is not really set up for the kind of customizations I want to do. The site I wish to tweak doesn't allow good control over fonts but some of its pages (user created) make a lot of use of some exotic Unicode ranges (eg. Khmer) that my OS/browser combination choose a terrible font for: Can I make

Why do I have to declare specific bold/italic variants for web font?

我是研究僧i 提交于 2020-12-12 06:17:28
问题 I'm trying to use the Ubuntu font on a website. I am using the FontSquirrel @font-face generator. On computers where the Ubuntu font is installed everything works fine when I simply have css like font-family: Ubuntu . But on other computers it won't work unless I explicitly state which particular variety I want like font-family: UbuntuRegular or font-family: UbuntuBoldItalic . It is the same situation across all browsers. It is silly to have to declare weight and style every time. Isn't there

Xcode: Load custom locally stored font for remote content in WKWebView

五迷三道 提交于 2020-07-10 06:55:06
问题 I'm using the newest version of Xcode and Swift . I have the following code to load an HTML string and use a custom font, I prior imported in Xcode: let html = """ <html> <body> <head> <style> @font-face { font-family: 'Blastimo'; src: local('Blastimo'), url('Blastimo.ttf') format('truetype'); } </style> </head> <h1 style="font-family:'Blastimo';font-size:50px;">This is my test!</h1> </body> </html> """ webView.loadHTMLString(html, baseURL: Bundle.main.resourceURL) The following code allows

Flash of unstyled content (FOUC) in Firefox only? Is FF slow renderer?

两盒软妹~` 提交于 2020-07-04 08:35:30
问题 I'm not seeing this issue in any other browser that I've tested - IE, Chrome, Opera - but whenever I load a page from the server, I'm seeing a flash of unstyled content before the CSS is applied. This is even happening on subsequent page loads where everything should be cached - every time the page loads I see the unstyled content for a split-second, then everything settles in. It's also worth noting (perhaps?) that the page is using @font-face to pull some Google fonts. They are stored in a

Flash of unstyled content (FOUC) in Firefox only? Is FF slow renderer?

大兔子大兔子 提交于 2020-07-04 08:35:01
问题 I'm not seeing this issue in any other browser that I've tested - IE, Chrome, Opera - but whenever I load a page from the server, I'm seeing a flash of unstyled content before the CSS is applied. This is even happening on subsequent page loads where everything should be cached - every time the page loads I see the unstyled content for a split-second, then everything settles in. It's also worth noting (perhaps?) that the page is using @font-face to pull some Google fonts. They are stored in a