gecko/gfx
Jonathan Kew db93ca8e58 bug 974575 - backport Behdad's patches for color bitmap glyph support from current cairo trunk. r=jrmuizel
* * *
[ft] Fix resizing of bitmap fonts
From b94a519aad3d5b50aa6de47ee16ee6a099de9791 Mon Sep 17 00:00:00 2001
Say, you were asking cairo for a font at 200px.  For bitmap-only fonts,
cairo was finding the closes strike size and using it.  If the strike
was at 20px, well, that's what you were getting.  We now scale that 20px
strike by a factor of 10 to get the correct size rendering.

Note that by itself this patch doesn't change much on the Linux desktop.
The reason is that the size you are interested in (eg. 200px) is lost by
fontconfig.  When you request a font at 200px, fontconfig returns a font
pattern that says 20px, and so the next layers thing you want a font at
20px.  To address that, one also needs a piece of fontconfig config that
puts the 200 back into the pixelsize.  Something like this:

<match target="font">
  <test name="scalable" mode="eq">
    <bool>false</bool>
  </test>
  <edit name="pixelsize" mode="assign">
    <times>
      <name>size</name>
      <name>dpi</name>
      <double>0.0138888888888</double> <!--1/72.-->
    </times>
  </edit>
</match>

I'm going to try to upstream this config so it will be enabled by
default.  The config can be a bit smarter.  For example, if
metricshinting is enabled and the size difference is small, we may as
well not scale.

The nice thing about this is that the configuration of whether and when
to scale bitmaps will be done in fontconfig, not cairo / Qt / ... code.
---
* * *
[FT] Prefer downscaling bitmap glyphs to upscaling

From a8f1b456db744e33a10b2301df03528787e5b1ca Mon Sep 17 00:00:00 2001
Say, you have bitmap strikes for sizes 50ppem and 100ppem.
To render at 60ppem, it's much better to downscale the 100ppem
bitmap than upscale 50ppem one.  Prefer downscaling.
---
* * *
[ft] I meant fabs(), not abs()

From 13bd8d09b44e50649f6fc4d58d036bc32c1d5c5b Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix memory bug in copying bitmaps

From a0f556f37fb7016aa304b7cf0e811c0d38f0b969 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix wrong assumptions

From e738079302a968b7b1fb9101cd4d92a8887bedce Mon Sep 17 00:00:00 2001
If subpixel rendering is enabled, but FT returns a 8bit gray bitmap
(perhaps because the font has 8bit embedded bitmaps) we were hitting
the assertions because the assumptions made were wrong.  Fix up.
---
* * *
Towards support loading color glyphs from FreeType

From 2cc353c3dbe01b4d8f65d6de800f2b1d6004a1c2 Mon Sep 17 00:00:00 2001
See comments.
---
* * *
Support 2bit and 4bit embedded bitmaps

From 9444ef09ccde2735258cc1bd2f1912119a32dd88 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix math

From 7d26341072b13a78d4b3fe58779057ac020be487 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Add missing include

From 0554d76402321b25cc952180e4d19436a9038d1a Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix alignment

From 34a747e7bdeba1cfe17318f80fbe6720d47bc023 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Ensure alignment of bitmaps received from FreeType

From 46d9db96d460fea72f0420102e8a90c6a7231f79 Mon Sep 17 00:00:00 2001
---
2014-03-06 12:29:22 +00:00
..
2d Bug 939276 - Use a single GLContext for all SkiaGL canvases r=jgilbert,vlad,gwright,bjacob 2014-03-05 15:49:37 -06:00
angle Bug 976896 - Port STL_FLAGS to moz.build; r=mshal 2014-03-04 19:39:06 -05:00
cairo bug 974575 - backport Behdad's patches for color bitmap glyph support from current cairo trunk. r=jrmuizel 2014-03-06 12:29:22 +00:00
gl Bug 980108 - GLContext.h should not use GLAPIENTRY decls. - r=kamidphish 2014-03-05 17:35:40 -08:00
graphite2 bug 951009 - update graphite2 library to upstream v1.2.4. r=jdaggett 2014-01-08 17:49:32 +00:00
harfbuzz bug 964240 - update harfbuzz to pick up Hangul shaper improvements and other fixes. r=jdaggett 2014-01-30 09:48:20 +00:00
ipc Backed out 12 changesets (bug 958596) for several Android permafails to fix a CLOSED TREE 2014-02-25 18:34:47 -08:00
layers Bug 939276 - Use a single GLContext for all SkiaGL canvases r=jgilbert,vlad,gwright,bjacob 2014-03-05 15:49:37 -06:00
ots bug 968026 - cherrypick and rebase upstream commit a9a5f453467d1494ebf9f31cba99c2c49b37fd52 to fix potential OTS crash. r=fredw 2014-02-05 11:15:55 +00:00
qcms Bug 979685 - Rewrite the qcms Makefile.in in moz.build; r=mshal 2014-03-05 17:00:17 -05:00
skia Bug 979684 - Port the per-source flags for skia to moz.build; r=mshal 2014-03-05 16:59:42 -05:00
src Bug 975773 - Filter primitives in error states can have inputs. r=roc 2014-03-03 14:31:27 +01:00
tests Bug 978274: Initialize gfxPrefs earlier, rename some methods, delete MigratePrefs from gfxPlatform. r=bgirard. 2014-03-04 12:26:33 -05:00
thebes Bug 939276 - Use a single GLContext for all SkiaGL canvases r=jgilbert,vlad,gwright,bjacob 2014-03-05 15:49:37 -06:00
ycbcr Bug 978594 - Part 3: Port some of the per-source flags to moz.build; r=glandium 2014-03-02 15:41:32 -05:00
moz.build