Mac font rendering on Windows [closed]

前提是你 提交于 2021-02-18 11:16:11

问题


I love the way Mac OS beautifully renders fonts (not just browsers). I was wondering if we could somehow get the same rendering in browsers running on Windows?

Someone recommended sIFR but I guess that's useful when I need to use non-standard fonts?


回答1:


Check out GDI++/FreeType (link, link). It's a highly configurable font-rendering replacement for Windows. With some configuration of hinting, anti-aliasing, etc, you should be able to approximate OSX style font rendering fairly close.




回答2:


use mactype

https://code.google.com/p/mactype/




回答3:


Not sure if this is a setup, but of course, Safari on Windows renders using the OS X rendering algorithm.




回答4:


Brad is right: use Safari if you want the Mac font rendering algorithm.

Jeff and Joel have both blogged about this before (not surprisingly, around the time that Safari was released for Windows), if you would like more details:

http://www.codinghorror.com/blog/archives/000885.html




回答5:


I'm assuming you would like to be ablt to use if globally, or at least in IE/Firefox, not just be installing Safari as other have suggested.

Back in the days wen Mac OS X was still in development, there was a plan to release the Cocoa framework for windows, to allow applications written to it to run natively on Windows with a recompile. I suspect that set of Cocoa windows libraries (Yellow Box wasn't it?) would have given you Mac OS X style font rendering but I don't think it was ever released (though you may be able to get very old beta versions of it from somewhere, and I have a feeling some of it was somehow part of WebObjects or something like that).

I suspect the windows version of Safari is using an internal version of the Cocoa libraries for Windows, whcih is why it has Mac OS X font rendering (though I believe recent nightly builds at least have the option to use Windows' native font rendering for those who were complaining about it looking out of place).

Anyway, long store short, unless you're going to write your own font renderer, I don't think there's any easy way to do it (other than using Safari)




回答6:


Someone recommended sIFR but I guess that's useful when I need to use non-standard fonts?

sIFR will not give you the intended effect. Like Windows's ClearType, Flash's anti-aliasing (which sIFR uses) optimizes towards the pixel grid, not towards accurate representation of the typeface.

You may be able to use Safari's bundled CoreGraphics library to do your font rendering, but you'd likely break Apple's license agreements (especially once you try to ship your app…).




回答7:


I'm writing a Java application doing some interesting things with fonts and working with some graphic designers, and they want the same kind of font rendering you're talking about. I was able to get pretty close by turning on fractional metrics aka sub-pixel glyph placement accuracy, and anti-aliasing, which are the key differences between Mac and Windows font rendering. Looks pretty good for larger TrueType fonts.

Here's the Java code I used. It's all done with their native font rendering engine (which I believe may be FreeType, not sure exactly).

g.setFont(new Font("Century Schoolbook", Font.PLAIN, 36));
g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
                   RenderingHints.VALUE_FRACTIONALMETRICS_ON);
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                   RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

Now if only I could figure out how to make OpenType CFF fonts work.




回答8:


Microsoft Powertoy Cleartype Tuner lets you tweak the way Cleartype works. It might help a little bit. Not sure it works on anything newer than Windows XP though.

Cleartype Tuner




回答9:


You could wait until IE9, which apparently has much better text rendering, using DirectX: http://blogs.msdn.com/ie/archive/2009/11/18/an-early-look-at-ie9-for-developers.aspx




回答10:


If you want mac osx rendering in firefox, you must use extension Anti-Aliasing Tuner:

https://addons.mozilla.org/firefox/addon/anti-aliasing-tuner/

Just set anti-aliasing mode as Default and rendering mode as Outline for small and large fonts and you're done.



来源:https://stackoverflow.com/questions/58399/mac-font-rendering-on-windows

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