sifr

如何在网站上添加一些非标准字体?

时光怂恿深爱的人放手 提交于 2020-02-27 22:55:42
有没有一种方法可以在网站上添加一些自定义字体而不使用图像, Flash 或其他图形? 例如,当我在一个婚礼网站上工作时,我发现了很多适合该主题的字体。 但是我找不到在服务器上添加该字体的正确方法。 以及如何将该字体和CSS一起包含到HTML中? 没有图形就可以做到吗? #1楼 在这种情况下,我担心图形是你唯一的选择。 #2楼 或者,您可以尝试 sIFR 。 我知道它使用Flash,但前提是可用。 如果没有Flash,它将以其原始(CSS)字体显示原始文本。 #3楼 我发现在网站上拥有非标准字体的最简单方法是使用 sIFR 它确实涉及使用包含字体的Flash对象,但是如果未安装Flash,它会很好地降级为标准文本/字体。 样式是在CSS中设置的,JavaScript会为您的文本设置Flash替换。 编辑:(我仍然建议将图像用于非标准字体,因为sIFR会增加项目时间,并且可能需要维护)。 #4楼 这可以通过CSS完成: <style type="text/css"> @font-face { font-family: "My Custom Font"; src: url(http://www.example.org/mycustomfont.ttf) format("truetype"); } p.customfont { font-family: "My Custom Font",

Anyone able to translate sIFR into AS3 (for hyphenation and with the help of a converter)?

[亡魂溺海] 提交于 2020-01-05 04:12:09
问题 One thing asked for a lot with sIFR is hyphenation. Now I almost solved it with integrating Hyphenator.as http://vis4.net/blog/2010/05/as3-hyphenation/. The only problem is that Hyphenator.as is written in AcionScript 3, while sIFR is in ActionScript 2. I found an AS2 to AS3 converter www.5etdemi.com/blog/archives/2006/11/as2-to-as3-converter-createtextfield-geturl-handling/ but the result examples.bezel.be/sIFR-as3.as is not working yet. Anyone able to contribute to making hyphenation work

How to get the click event on sIFR embedded tag in IE?

只愿长相守 提交于 2020-01-04 09:22:04
问题 I have implemented Scalable Inman Flash Replacement (sIFR) to convert text. The issue is, I'm unable to do onClick event over the iSFR embed tags. $(function() { $("embed").click(function(){ alert('clicked over embed'); }); }); This works in Firefox but not in Internet Explorer. Can anybody help me? 回答1: Flash movies tend to eat these events. sIFR 3 lets you specify an onRelease callback handler in the sIFR.replace() arguments, which is called when the Flash movie is clicked on. 回答2: It might

sIFR not working with prototype AJAX page load

若如初见. 提交于 2019-12-25 14:05:51
问题 I have a website with two pages. A and B. When you click on a link in page A, it will uses the Prototype Ajax.Updater() to load the link page (page B) into a div on the page (Page A). When page B loads into page A, the sIFR replacements are not working and the tag inner text is not even showing. I have tried doing a sIFR.redraw() when the page has loaded into the div, with no success. When i view page B in the browser by itself, it works perfectly. Is it possible to insert HTML into a DIV tag

Text wrapping inconsistent in Firefox 3 on PC only

為{幸葍}努か 提交于 2019-12-25 11:27:20
问题 This is a recurring problem I have in Firefox 3.0. It seems when I keep refreshing sometimes it wraps, sometimes it doesn't. When it doesn't wrap, I can adjust the window size and the sIFR'd element will snap to its correct size. I need my elements to wrap on load, based on the width of it's container. I have the most current 'nightly build' of sIFR 3.0. I want to sIFR a h2 tag. The h2 tag is enclosed in a div, and both have set widths. <div class="recipe-title"> <h2>This is a recipe title<

Text wrapping inconsistent in Firefox 3 on PC only

我的梦境 提交于 2019-12-25 11:26:14
问题 This is a recurring problem I have in Firefox 3.0. It seems when I keep refreshing sometimes it wraps, sometimes it doesn't. When it doesn't wrap, I can adjust the window size and the sIFR'd element will snap to its correct size. I need my elements to wrap on load, based on the width of it's container. I have the most current 'nightly build' of sIFR 3.0. I want to sIFR a h2 tag. The h2 tag is enclosed in a div, and both have set widths. <div class="recipe-title"> <h2>This is a recipe title<

sIFR load before rest of page?

試著忘記壹切 提交于 2019-12-23 01:30:12
问题 Is it possible to have sIFR "preload" or load before the rest of the page content? At present it is the last thing to load (due to the text position) and as it's quite an obvious part of the page I get a huge mash-up of text replacement all in a quick flurry which is not very appealing. It looks like the site is having an epileptic fit. Once loaded, all is fine though :) Any work-arounds to the load-fitting? Cheers Hugh 回答1: There are a two separate issues here: Replacing the elements as soon

Custom font and a CMS

假如想象 提交于 2019-12-23 00:54:04
问题 I'm building a web site for an artist who has had a custom font made from his handwriting. He'd like to use this font extensively throughout the site - not for all body copy because it'd be difficult to read, but for headings, navigation, callouts, things like that. I've got the file - it's a TrueType font file. We're going to be using a PHP-based CMS to build the site. What is the best way to go about using this custom font for this purpose while still allowing page name, titles, etc. to be

Custom font and a CMS

谁说胖子不能爱 提交于 2019-12-23 00:53:11
问题 I'm building a web site for an artist who has had a custom font made from his handwriting. He'd like to use this font extensively throughout the site - not for all body copy because it'd be difficult to read, but for headings, navigation, callouts, things like that. I've got the file - it's a TrueType font file. We're going to be using a PHP-based CMS to build the site. What is the best way to go about using this custom font for this purpose while still allowing page name, titles, etc. to be

Well rendered webfont solution

亡梦爱人 提交于 2019-12-20 04:10:22
问题 The challenge: Provide dynamic web fonts that render acceptably across all major browsers, devices and Operating Systems The story: So I had used cufon or sifr in the past and had since abandoned both in favor of @font-face. After using @font-face in production for some time, I made a horrifying discovery. Many fonts (most?) look like crap in Windows XP, regardless of browser. Even in google chrome, XP renders the fonts unacceptably jagged and ugly. I am aware of why this is happening. After