If MS Word can render custom fonts, shouldn't that mean Outlook can render custom fonts? - html-email

It's common knowledge that Outlook uses Word to render emails. It's also fairly widely known in the HTML email community that Outlook will render a custom font as Times New Roman.
Currently, I hide my font statement from Outlook using conditional statements, and then set Arial as the font. But it occurs to me that Word can use custom fonts, so does anyone know why Outlook can't? And does that mean it can but we haven't worked it out yet?

Microsoft Word and Outlook can display any font that's installed on a system, but Outlook cannot display a remotely referenced font. Outlook can display any font, custom or not, as long as it's installed in a user's local system. But it cannot display a non-system font that's referenced on a remote server.
Let's use Open Sans as an example. Open Sans doesn't come pre-installed on most computers, but it is freely available to download and install from Google Fonts. If you send an email with Open Sans in the font stack and someone with that font installed on their system opens it in Outlook, Outlook will display Open Sans.
However Outlook is not able to display remote fonts. So if a user above does not have Open Sans on their system, Outlook is not able to reference a copy of the font on a remote server to display it.
<!-- Outlook doesn't support this -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
Not only does Outlook not support remote fonts, but it chokes on the reference above and display Times New Roman instead (as you mention). This can be fixed by placing the font reference inside a tag that Outlook ignores, like so:
<!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->
<!--[if mso]>
<style>
* {
font-family: sans-serif !important;
}
</style>
<![endif]-->
<!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. -->
<!--[if !mso]><!-->
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<!--<![endif]-->
I hope this helps explain how fonts work in Outlook!

Related

Myanmar font set up at website

My website needs to allow users to key-in Myanmar font.
I am looking around and there is no proper documentation how to setup at webpage.
A few font providers are found like thanlwin, MyMyanmar Language ,etc. But there is no proper documentation how to setup their libraries.
I saw a few Myanmar unicode fonts, don't know which one to choose.
May I have some guide how to install lib at my server to support Myanmar font at my webpage?
Wikipedia uses the fallback sans serif (Helvetica / Arial) of your operating system for displaying Myanmar.
if you would prefer a specific font you can convert it the common font files (of course with the permission of the font designer):
https://www.fontsquirrel.com/tools/webfont-generator
Now you can upload it to your server and include it via #font-face (you’ll receive an example css file).

Google's Open Sans Regular 400 always italic?

It seems that Google is now serving Open Sans Regular 400 as italic. Anyone else experiencing the same issue?
Preview tools from various websites suggest the same. This screenshot is from http://typecast.com/preview/google/Open%20Sans
I found the reason for the issue:
I had installed some of Google's Open Sans font styles (Bold, Bold Italic, Italic, etc), but not Regular 400, using the service called SkyFonts.
When any website offered to serve a webfont-version of Open Sans, Chrome obviously resolved to using the system font Open Sans, falling back to 400 italic, which was the closest to 400 Regular, rather than downloading the webfonts.
Internet Explorer was not handling the issue the same way, and managed thus to present the webfont instead of using the closest matched system font.
Solution
The solution was one of the following:
Remove all locally installed Open Sans font variations
Install the missing 400 regular font variation in addition to those already there

Multipart emails — is there a mime type that ONLY MS Outlook will open / parse?

I'm working on emails that have to be both responsive (mobile / desktop) and friendly across a wide range of clients. For the most part we have pretty simple designs but there are a couple of places I'm getting bogged down.
I'm honestly at the point where I'd rather just create a totally separate MS-Word / Outlook-friendly design, using Outlook as the creator — it'd be easier and faster than trying to develop the whole d*mn thing for every client. Does anyone know if there's a way to hack mime types — so Outlook and related clients will open the outlook-friendly part, and other clients will open the HTML part?
No need to hack mime types, just wrap your outlook version in
<!--[if gte mso 9]> outlook tables <![endif]--> and your non outlook version in <!--[if !mso]><!--> other tables <!--<![endif]--> and send the whole thing as one html file.
You can do things this way, but i'll warn you that even outlook's html email tools don't always show up right in outlook. I'd recommend biting the bullet and learning how to make desktop code that works in the MSO versions of outlook ('07, '10, '13).
Pro tip for outlook compatibility: use padding on <td>s for spacing and nest tables when padding-top gives you issues in outlook 13.

Why does my #font-face font work even when I delete the #font-face code, AND uninstall the font from my machine?

I was messing around with #font-face and I had some weird results. I downloaded and installed the font and it got installed in /Users/myuser/Library/Fonts like it should (I suppose!?). The weird thing is that it was working whatever URL I gave it in CSS.
Now I have removed the #font-face class from the CSS altogether, emptied all possible caches, even disabled & removed the 'Garton' font from Font Book (Mac thingie), but it’s still working! (I’m developing and viewing the page in Eclipse.)
So...
1: how can it work? The only way to make it fail is when I edit the font-family 'Garton' in CSS. Whatever I write in #font-face it works and I have no duplicates in CSS! I restarted the computer, put it up in my PC where it fails. I looked in /Library/Fonts where default fonts are installed I suppose, and there is no 'Garton' there.
Works even without #font-face in css
#header{
font-family: 'Garton',Georgia, serif;
}
Only way to make it fail on mac
#header{
font-family: 'GartonXXX',Georgia, serif;
}
2: If ever get clarity in this, I guess I must install the font it on the webserver that’s hosting the page? Or is there another way?
3: Why do my downloaded fonts get installed in different folder than the default fonts? (Not so important, but I’m very confused.)
If you’ve removed Garton from your Mac, it is odd that your web page still renders in Garton even without #font-face code. I can only imagine that Garton is still installed on your Mac.
Questions regarding that are better asked at apple.stackexchange.com or superuser.com.
If you’re working with #font-face, it’s better not to install the font on your development machine, so that you see what normal users see.
Yes — to use Garton on a public web site (where people without Garton installed on their machines will view the site), you need to have the font file available on the site’s server, or via a font service like Typekit or FontSpring.
You don’t need to actually “install” the font on the web server, you just need to serve the font file from there, just like you were serving an image file or a stylesheet, so that the browser can get it and use it on your web page.
In order to get it to work across browsers, you need to have the font file in a few different formats, and be careful with your #font-face CSS to avoid tripping up Internet Explorer. The easiest way to get this right is to use Font Squirrel’s #font-face generator.
Again, this is a question for apple.stackexchange.com or superuser.com.

Is it possible to use international characters with the JasperReport library (5.2.0)?

I'm currently trying to display Japanese characters in a report produced using JasperReports 5.2.0. The Japanese characters in the document are lost. When I examine the PDF properties I see that only one font exists in the document: Helvetica.
Through some research I've found that the IText library is responsible for producing the PDF export. JasperReports 5.2.0 uses itext-2.1.7.js2. This jar does not contain international character sets. Instead, this is provided separately in IText-Asian, under a different license (AGPL).
The JasperReports library tutorial (http://community.jaspersoft.com/wiki/jasperreports-library-tutorial) says:
To simplify the use of the font settings, a new element was
introduced: .
Report fonts are report level font definitions that ca be used as
default or base font settings in other font definitions throughout the
entire report. Since the support for international characters is
somehow tied to the iText library, you can find more details about how
to create PDF documents in different languages and different character
sets in the iText documentation.
This seems to imply that the international characters are locked behind the later versions of the IText library.
Is it possible to embed international character fonts into a PDF without upgrading to JasperReports 6.x, or IText 5.x?
Update:
I have tried to set up a simple font extension using a JasperReports_extensions.properties with the contents:
net.sf.jasperreports.extension.registry.factory.simple.font.families=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
net.sf.jasperreports.extension.simple.font.families.test=path/to/fonts/fonts.xml
This XML file contains:
<fontFamily name="Arial Unicode MS">
<normal>path/to/fonts/testJA/ARIALUNI.TTF</normal>
<pdfEncoding>Identity-H</pdfEncoding>
<pdfEmbedded>true</pdfEmbedded>
<exportFonts>
<export key="net.sf.jasperreports.html">'Arial Unicode MS', Arial, Helvetica, sans-serif</export>
<export key="net.sf.jasperreports.xhtml">'Arial Unicode MS', Arial, Helvetica, sans-serif</export>
</exportFonts>
<locales>
<locale>ja_JP</locale>
</locales>
</fontFamily>
The target directory contains the windows ARIALUNI.TTF file. (Note, not intending on using this, only using it currently for debugging).