summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbesfahbo <besfahbo>2006-08-23 00:31:05 +0000
committerbesfahbo <besfahbo>2006-08-23 00:31:05 +0000
commite3df1420c6f37d5e0935af7dd161d56dcfa5eed2 (patch)
tree0671e101a4e95bd9259e25b12802054726163d78
parent- Rebuild (diff)
downloadlibrewolf-fedora-ff-e3df1420c6f37d5e0935af7dd161d56dcfa5eed2.tar.gz
librewolf-fedora-ff-e3df1420c6f37d5e0935af7dd161d56dcfa5eed2.tar.bz2
librewolf-fedora-ff-e3df1420c6f37d5e0935af7dd161d56dcfa5eed2.zip
- Add a better nopangoxft patch that doesn't depend on pangocairo
- Add firefox-1.5-pango-mathml.patch (bug 150393)
-rw-r--r--firefox-1.5-nopangoxft.patch45
-rw-r--r--firefox-1.5-pango-mathml.patch42
-rw-r--r--firefox.spec10
3 files changed, 95 insertions, 2 deletions
diff --git a/firefox-1.5-nopangoxft.patch b/firefox-1.5-nopangoxft.patch
new file mode 100644
index 0000000..becf0a1
--- /dev/null
+++ b/firefox-1.5-nopangoxft.patch
@@ -0,0 +1,45 @@
+--- mozilla/gfx/src/gtk/mozilla-decoder.cpp.noxft 2004-11-07 18:59:23.000000000 -0500
++++ mozilla/gfx/src/gtk/mozilla-decoder.cpp 2006-08-06 18:24:37.000000000 -0400
+@@ -40,10 +40,9 @@
+ #define PANGO_ENABLE_ENGINE
+
+ #include "mozilla-decoder.h"
+-#include <pango/pangoxft.h>
+ #include <pango/pangofc-fontmap.h>
+ #include <pango/pangofc-font.h>
+-#include <gdk/gdkx.h>
++#include <gdk/gdkpango.h>
+
+ #include "nsString.h"
+ #include "nsIPersistentProperties2.h"
+@@ -54,6 +53,7 @@
+ #include "nsCompressedCharMap.h"
+
+ #undef DEBUG_CUSTOM_ENCODER
++#define DEBUG_CUSTOM_ENCODER 1
+
+ G_DEFINE_TYPE (MozillaDecoder, mozilla_decoder, PANGO_TYPE_FC_DECODER)
+
+@@ -145,6 +145,13 @@ mozilla_decoders_init(void)
+ if (initialized)
+ return 0;
+
++ PangoContext* context = gdk_pango_context_get ();
++ PangoFontMap* fontmap = pango_context_get_font_map (context);
++ g_object_unref (context);
++
++ if (!PANGO_IS_FC_FONT_MAP (fontmap))
++ return -1;
++
+ encoder_hash = g_hash_table_new(g_str_hash, g_str_equal);
+ cmap_hash = g_hash_table_new(g_str_hash, g_str_equal);
+ wide_hash = g_hash_table_new(g_str_hash, g_str_equal);
+@@ -208,7 +215,7 @@ mozilla_decoders_init(void)
+ }
+ }
+
+- pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_xft_get_font_map(GDK_DISPLAY(),gdk_x11_get_default_screen())),
++ pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(fontmap),
+ mozilla_find_decoder,
+ NULL,
+ NULL);
diff --git a/firefox-1.5-pango-mathml.patch b/firefox-1.5-pango-mathml.patch
new file mode 100644
index 0000000..98c4136
--- /dev/null
+++ b/firefox-1.5-pango-mathml.patch
@@ -0,0 +1,42 @@
+--- mozilla/gfx/src/gtk/nsFontMetricsPango.cpp.mathml 2006-02-23 16:01:42.000000000 -0500
++++ mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 2006-08-22 20:06:40.000000000 -0400
+@@ -829,30 +829,27 @@ nsFontMetricsPango::GetBoundingMetrics(c
+ goto loser;
+ }
+
+- pango_layout_set_text(layout, text, strlen(text));
++ pango_layout_set_text(layout, text, -1);
+ FixupSpaceWidths(layout, text);
+
+- // Get the logical extents
+ PangoLayoutLine *line;
+ if (pango_layout_get_line_count(layout) != 1) {
+ printf("Warning: more than one line!\n");
+ }
+ line = pango_layout_get_line(layout, 0);
+
+- // Get the ink extents
+- PangoRectangle rect;
+- pango_layout_line_get_extents(line, NULL, &rect);
++ // Get the ink and logical extents
++ PangoRectangle ink, logical;
++ pango_layout_line_get_extents(line, &ink, &logical);
+
+ float P2T;
+ P2T = mDeviceContext->DevUnitsToAppUnits();
+
+- aBoundingMetrics.leftBearing =
+- NSToCoordRound(rect.x * P2T / PANGO_SCALE);
+- aBoundingMetrics.rightBearing =
+- NSToCoordRound(rect.width * P2T / PANGO_SCALE);
+- aBoundingMetrics.width = NSToCoordRound((rect.x + rect.width) * P2T / PANGO_SCALE);
+- aBoundingMetrics.ascent = NSToCoordRound(rect.y * P2T / PANGO_SCALE);
+- aBoundingMetrics.descent = NSToCoordRound(rect.height * P2T / PANGO_SCALE);
++ aBoundingMetrics.leftBearing = NSToCoordRound(PANGO_LBEARING(ink) * P2T / PANGO_SCALE);
++ aBoundingMetrics.rightBearing = NSToCoordRound(PANGO_RBEARING(ink) * P2T / PANGO_SCALE);
++ aBoundingMetrics.ascent = NSToCoordRound(PANGO_ASCENT(ink) * P2T / PANGO_SCALE);
++ aBoundingMetrics.descent = NSToCoordRound(PANGO_DESCENT(ink) * P2T / PANGO_SCALE);
++ aBoundingMetrics.width = NSToCoordRound(logical.width * P2T / PANGO_SCALE);
+
+ loser:
+ g_free(text);
diff --git a/firefox.spec b/firefox.spec
index bcb3186..86e5efc 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -11,7 +11,7 @@
Summary: Mozilla Firefox Web browser.
Name: firefox
Version: 1.5.0.6
-Release: 3
+Release: 4
URL: http://www.mozilla.org/projects/firefox/
License: MPL/LGPL
Group: Applications/Internet
@@ -53,7 +53,8 @@ Patch27: firefox-gnomestripe-0.1-livemarks.patch
Patch42: firefox-1.1-uriloader.patch
# font system fixes
-Patch81: firefox-nopangoxft.patch
+Patch81: firefox-1.5-nopangoxft.patch
+Patch82: firefox-1.5-pango-mathml.patch
# patches from upstream (Patch100+)
Patch101: firefox-1.5-pango-ua.patch
@@ -136,6 +137,7 @@ removed in favor of xulrunner-devel.
#%patch27 -p1
%patch42 -p0
%patch81 -p1
+%patch82 -p1
%patch101 -p0 -b .pango-ua
%patch102 -p0 -b .pango-about
@@ -354,6 +356,10 @@ fi
#---------------------------------------------------------------------
%changelog
+* Tue Aug 22 2006 Behdad Esfahbod <besfahbo@redhat.com> - 1.5.0.6-4
+- Add a better nopangoxft patch that doesn't depend on pangocairo
+- Add firefox-1.5-pango-mathml.patch (bug 150393)
+
* Tue Aug 08 2006 Kai Engert <kengert@redhat.com> - 1.5.0.6-3
- Rebuild
bgstack15