Commit Graph

3248 Commits

Author SHA1 Message Date
Behdad Esfahbod 515a0ac81e Fix compiler warning 2013-08-09 09:40:59 -04:00
Behdad Esfahbod 10f964623f Round when scaling values
Doesn't matter for most users since they should be working in a
fixed sub-pixel scale anyway (ie. 22.10, 26.6, 16.16, etc).
2013-08-09 09:40:01 -04:00
Behdad Esfahbod df8f70ae5d Minor 2013-08-09 09:35:10 -04:00
Behdad Esfahbod ce8badf180 Minor 2013-08-09 09:31:06 -04:00
Behdad Esfahbod d71c0df2d1 Remove vrt2, vkrn, vpal, and valt from default vertical features
See thread by John Dagget on the list.
2013-08-09 09:29:29 -04:00
Behdad Esfahbod a782a5e9a3 [coretext] Start adding support for features
Unlike AAT, looks like with CoreText very few OT features can be mapped.
:(
2013-08-07 22:08:29 -04:00
Behdad Esfahbod bdd8873fd8 Revert "[Indic] don't apply 'calt' by default in Indic shaper"
This reverts commit 952121007c.

In light of discussion on the mailing list...
2013-08-07 17:58:25 -04:00
Behdad Esfahbod 9a175914d7 [uniscribe] Support feature ranges
As Khaled pointed out, right now setting any features, turns kern
and possibly other features off.
2013-08-07 17:29:32 -04:00
Behdad Esfahbod 627af695e4 More git.mk updates 2013-08-06 16:53:56 -04:00
Behdad Esfahbod 722252743d Update git.mk 2013-08-06 15:19:23 -04:00
Behdad Esfahbod 38d5c58d23 [uniscribe] Half-support user features
Turning features on globally works now.
2013-08-06 14:45:36 -04:00
Behdad Esfahbod 639afdc690 Minor 2013-08-06 14:28:12 -04:00
Jonathan Kew 952121007c [Indic] don't apply 'calt' by default in Indic shaper 2013-08-06 10:36:14 -04:00
Behdad Esfahbod 625678436c Fix glyph closure with class==0
As reported by cibu.  Untested.
2013-08-05 22:44:18 -04:00
Behdad Esfahbod 580d5eb93a Don't apply 'dlig' by default
Windows 8 doesn't, and the spec will be fixed.
2013-08-04 16:55:21 -04:00
Behdad Esfahbod 48382e2f41 Minor 2013-07-30 18:25:39 -04:00
Behdad Esfahbod c461371419 [CoreText] Don't leak the CTLine object (and everything that hangs off it)
Patch from Jonathan Kew.
2013-07-30 14:48:23 -04:00
Behdad Esfahbod 5fbc952524 Fix glyph name printing in hb-ot-shape-closure 2013-07-29 14:34:40 -04:00
Behdad Esfahbod 6fadd9dd7c Apply 'mark' to Myanmar
According to Andrew Glass: "The issue with Myanmar <mark> feature was
fixed via a servicing patch as soon as Windows 8 became available."
2013-07-26 10:33:06 -04:00
Behdad Esfahbod 86522e493d Fix glyph closure recursion! 2013-07-22 19:07:53 -04:00
Behdad Esfahbod 74439d0aa1 Minor 2013-07-22 19:02:29 -04:00
Behdad Esfahbod 8b427c78ef [uniscribe] Sanitize font file 2013-07-22 10:57:05 -04:00
Behdad Esfahbod 12ff69df21 [uniscribe] Handle TTC when renaming font 2013-07-22 10:52:12 -04:00
Behdad Esfahbod 05bad3b8c2 [uniscribe] Use OT::* types 2013-07-21 17:19:09 -04:00
Behdad Esfahbod bdeea605fe [uniscribe] Move name generation into separate function 2013-07-21 17:19:09 -04:00
Behdad Esfahbod 73f947e2a7 [uniscribe] Use blob to pass data around 2013-07-21 17:19:09 -04:00
Behdad Esfahbod 8ac2e88def [uniscribe] Use unique font name
When installing per-process fonts using AddFontMemResourceEx(),
if a font with the same family name is already installed, sometimes
that one gets used.  Which is problematic for us.  As such, we
now mangle the font to install a new 'name' table with a unique
name, which we then use to choose the font.

Patch from Jonathan Kew.
2013-07-21 17:17:44 -04:00
Behdad Esfahbod 8751de5083 Followup fix for 3f9e2dced2
During GSUB, if a ligation happens, subsequence context input matching
matches the new indexing.  During GPOS however, the indices never
change.  So just go one by one.

Fixes 'dist' positioning with mmrtext.ttf and the following sequence:

  U+1014,U+1039,U+1011,U+1014,U+1039,U+1011,U+1014,U+1039,U+1011

Reported by Jonathan Kew.
2013-07-18 16:29:50 -04:00
Behdad Esfahbod 2b78d67e9f 0.9.19 2013-07-16 16:06:27 -04:00
Behdad Esfahbod e509d35cf1 [ft] hb_ft_get_glyph_from_name fails for the name of glyph id 0
Based on patch from Jonathan Kew, as reported on the mailing list.
2013-07-11 14:56:45 -04:00
Behdad Esfahbod 29b596ac67 [uniscribe] Fix buffer allocation
Email from Jonathan Kew:

My cygwin build kept aborting on certain test words when run with the
uniscribe backend. Turned out this was caused by a bug in the allocation
of scratch buffers in hb-uniscribe.cc.

Commit 2a17f9568d introduced a new line

  ALLOCATE_ARRAY (SCRIPT_VISATTR, vis_attr, glyphs_size);

but it failed to account for this in the computation of glyphs_size
(the number of glyphs for which scratch buffer space is available),
with the result that the vis_clusters array ends up overrunning the
end of the scratch buffer and clobbering the beginning of the buffer's
info[].

AFAICS, the vis_attr array is not actually used, so the simple fix is
to remove the line that allocates it. (If/when we -do- need to use
vis_attr for something, we'll need to add another term to the earlier
calculation of glyphs_size.)

With this patch, the uniscribe backend runs reliably again.

JK
2013-07-08 08:37:15 -06:00
Behdad Esfahbod 9245e98742 [Indic] Add Javanese config
We should add for other scripts too, send me the virama codepoint
and script name...
2013-06-26 20:57:58 -04:00
Behdad Esfahbod 5f85c80a07 [OT] Collect requiredFeature only if features are not provided
As per Werner's report on the list.
2013-06-26 20:14:18 -04:00
Behdad Esfahbod 3f9e2dced2 Fix contextual lookup recursion indexing
See email thread "Skipping Control for Attaching Marks using OpenType"
from earlier this month.
2013-06-26 19:46:55 -04:00
Behdad Esfahbod f5da11e0fa Merge pull request #3 from LogosBible/master
Destroy lookups before blobs.
2013-06-22 08:04:05 -07:00
Bradley Grainger 89312b7417 Destroy lookups before blobs.
'layout->gsub' may depend on data owned by 'layout->gsub_blob', so it must
be deinitialized before the blob is destroyed.
2013-06-21 15:02:18 -07:00
Behdad Esfahbod 79d1007a50 If variation selector is not consumed by cmap, pass it on to GSUB
This changes the semantics of get_glyph() callback and expect that
callbacks return false if the requested variant is not available, and
then we will call them back with variation_selector=0 and will retain
the glyph for the selector in the glyph stream.

Apparently most Mongolian fonts implement the Mongolian Variation
Selectors using GSUB, not cmap.

https://bugs.freedesktop.org/show_bug.cgi?id=65258

Note that this doesn't fix the Mongolian shaping yet, because the way
that's implemented is that the, say, 'init' feature ligates the letter
and the variation-selector.  However, since currently the variation
selector doesn't have the 'init' mask on, it will not be matched...
2013-06-13 19:01:07 -04:00
Behdad Esfahbod c7a8491720 Skip over multiple variation selectors in a row 2013-06-10 15:08:49 -04:00
Behdad Esfahbod 7235f33f9e Fix misc warnings reported by cppcheck
https://bugs.freedesktop.org/show_bug.cgi?id=65544
2013-06-10 15:08:49 -04:00
Behdad Esfahbod 570bcccd3f Fix PKG_CHECK_MODULES usage
Oops.

Bug 65246 - Fix build without graphite2
2013-06-10 13:57:25 -04:00
Behdad Esfahbod 270cfd7a9c Fix PKG_CHECK_MODULES usage
Bug 65246 - Fix build without graphite2

If we don't provide ACTION-IF-NOT-FOUND, configure aborts if it can't
find the libraries.  We handle that ourselves so we don't want the
macro to abort.
2013-06-06 18:57:15 -04:00
Behdad Esfahbod 2fd0e02706 Minor 2013-06-06 17:16:01 -04:00
Chun-wei Fan b4c5c52944 util/ansi-print.cc: Use fallback implementation for lround on MSVC
Unfortuately Visual Studio (still) does not support the C99 function
lround, so provide a fallback implementation for it.
2013-06-03 18:50:26 -04:00
Behdad Esfahbod a4446b10bf Fix build for C89 compilers 2013-06-03 18:39:14 -04:00
Behdad Esfahbod 4ddf937242 Remove unnecessary stdint.h include 2013-06-03 18:36:26 -04:00
Chun-wei Fan 93a04b8b5e hb-uniscribe.cc: Re-enable build under Visual Studio
-Declare hinstLib at the top of block
-Fix the definitions of the typedefs of ScriptItemizeOpenType,
 ScriptShapeOpenType and ScriptPlaceOpenType
2013-06-03 18:32:59 -04:00
Behdad Esfahbod 280e52ae95 Fix ChangeLog regen 2013-05-30 18:04:24 -04:00
Behdad Esfahbod c1824daefa Update TODO 2013-05-29 15:30:54 -04:00
Behdad Esfahbod 2966d36032 Fix test build 2013-05-28 17:34:37 -04:00
Behdad Esfahbod 6873f6cc42 Minor 2013-05-28 17:33:16 -04:00