Accept TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS from name table
The OT spec says:
"When building a Unicode font for Windows, the platform ID should be 3 and the
encoding ID should be 1. When building a symbol font for Windows, the platform
ID should be 3 and the encoding ID should be 0."
We were ignoring the SYMBOL_CS entry before. It's UTF-16/UCS-2 like the
UNICODE_CS.
Also, always use UTF-16BE instead of UCS-2BE. The conversion was doing
UTF-16BE anyway.
Behdad Esfahbod [Wed, 18 Nov 2009 14:10:05 +0000 (09:10 -0500)]
Remove bogus comment
Last night in between my dreams I also noticed that we support Unicode
values up to 0x01000000 and not 0x00100000 which I thought before.
This covers the entire Unicode range.
Behdad Esfahbod [Mon, 16 Nov 2009 20:39:16 +0000 (15:39 -0500)]
Bump cache version up from 2 to 3 and fix FcLangSet caching/crash
Protect cache against future expansions of FcLangSet (adding new
orth files). Previously, doing so could change the size of
that struct. Indeed, that happened between 2.6.0 and 2.7.3, causing
crashes. Unfortunately, sizeof(FcLangSet) was not checked in fcarch.c.
This changes FcLangSet code to be able to cope with struct size changes.
And change cache format, hence bumping from 2 to 3.
Use default config in FcFileScan() and FcDirScan()
Before a NULL config was passed down adn essentially FcFileScan was
equivalent to FcFreeTypeQuery. Now fc-scan tool correctly applies
the configuration to the scanned patterns.
- Arabic (ar), Persian (fa), and Urdu (ur) now use generic forms (bug #23004)
- Persian (fa) orthography updated to latest standards and orthographies
- Persian dialects Dari/Eastern Farsi (prs) and Western Farsi (pes) added
Tor Lillqvist [Thu, 13 Aug 2009 21:16:18 +0000 (00:16 +0300)]
Use multi-byte codepage aware string function on Windows
The East Asian double-byte codepages have characters with backslash as
the second byte, so we must use _mbsrchr() instead of strrchr() when
looking at pathnames in the system codepage.
Tor Lillqvist [Thu, 13 Aug 2009 21:08:17 +0000 (00:08 +0300)]
Fix heap corruption on Windows in FcEndElement()
Must not call FcStrFree() on a value returned by
FcStrBufDoneStatic(). In the Windows code don't bother with dynamic
allocation, just use a local buffer.
Hardcode /etc/fonts instead of @CONFDIR@ in docs (#22911)
We distribute the docs, so it makes little sense to distribute with
@CONFDIR@ replaced. Until we find a better solution, I've hardcoded
/etc/fonts now.
Behdad Esfahbod [Wed, 18 Mar 2009 23:28:52 +0000 (19:28 -0400)]
[fc-lang] Make LangSet representation in the cache files stable
Fontconfig assigns an index number to each language it knows about.
The index is used to index a bit in FcLangSet language map. The bit
map is stored in the cache.
Previously fc-lang simply sorted the list of languages and assigned
them an index starting from zero. Net effect is that whenever new
orth files were added, all the FcLangSet info in the cache files would
become invalid. This was causing weird bugs like this one:
With this commit we fix the index assigned to each language. The index
will be based on the order the orth files are passed to fc-lang. As a
result all orth files are explicitly listed in Makefile.am now, and
new additions should be made to the end of the list. The list is made
to reflect the sorted list of orthographies from 2.6.0 released followed
by new additions since.
This fixes the stability problem. Needless to say, recreating caches
is necessary before any new orthography is recognized in existing fonts,
but at least the existing caches are still valid and don't cause bugs
like the above.
Behdad Esfahbod [Tue, 17 Mar 2009 16:52:48 +0000 (12:52 -0400)]
Revert "[conf] Disable hinting when emboldening (#19904)" (#20599)
This reverts commit 10609af4aa4030a15c19573198462fa002d2ef13.
Apparently disabling hinting can cause worse rendering with certain
fonts. This is better handled on a per font basis.