This commit is contained in:
parent
32dc64335e
commit
b785d2aba8
@ -1,136 +0,0 @@
|
||||
diff -ur pango-1.10.1.old/pango/pangofc-fontmap.c pango-1.10.1/pango/pangofc-fontmap.c
|
||||
--- pango-1.10.1.old/pango/pangofc-fontmap.c 2005-07-23 06:39:27.000000000 +0800
|
||||
+++ pango-1.10.1/pango/pangofc-fontmap.c 2005-10-20 14:48:52.000000000 +0800
|
||||
@@ -83,6 +83,8 @@
|
||||
|
||||
PangoFcFamily *family;
|
||||
char *style;
|
||||
+
|
||||
+ guint fake : 1;
|
||||
};
|
||||
|
||||
struct _PangoFcFamily
|
||||
@@ -1671,7 +1673,7 @@
|
||||
FcPattern *match_pattern;
|
||||
FcPattern *result_pattern;
|
||||
|
||||
- if (is_alias_family (fcfamily->family_name))
|
||||
+ if (fcface->fake)
|
||||
{
|
||||
if (strcmp (fcface->style, "Regular") == 0)
|
||||
return make_alias_description (fcfamily, FALSE, FALSE);
|
||||
@@ -1851,11 +1853,13 @@
|
||||
*/
|
||||
static PangoFcFace *
|
||||
create_face (PangoFcFamily *fcfamily,
|
||||
- const char *style)
|
||||
+ const char *style,
|
||||
+ gboolean fake)
|
||||
{
|
||||
PangoFcFace *face = g_object_new (PANGO_FC_TYPE_FACE, NULL);
|
||||
face->style = g_strdup (style);
|
||||
face->family = fcfamily;
|
||||
+ face->fake = fake;
|
||||
|
||||
return face;
|
||||
}
|
||||
@@ -1880,38 +1884,85 @@
|
||||
fcfamily->faces = g_new (PangoFcFace *, fcfamily->n_faces);
|
||||
|
||||
i = 0;
|
||||
- fcfamily->faces[i++] = create_face (fcfamily, "Regular");
|
||||
- fcfamily->faces[i++] = create_face (fcfamily, "Bold");
|
||||
- fcfamily->faces[i++] = create_face (fcfamily, "Italic");
|
||||
- fcfamily->faces[i++] = create_face (fcfamily, "Bold Italic");
|
||||
+ fcfamily->faces[i++] = create_face (fcfamily, "Regular", TRUE);
|
||||
+ fcfamily->faces[i++] = create_face (fcfamily, "Bold", TRUE);
|
||||
+ fcfamily->faces[i++] = create_face (fcfamily, "Italic", TRUE);
|
||||
+ fcfamily->faces[i++] = create_face (fcfamily, "Bold Italic", TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
- FcObjectSet *os = FcObjectSetBuild (FC_STYLE, NULL);
|
||||
+ FcObjectSet *os = FcObjectSetBuild (FC_STYLE, FC_WEIGHT, FC_SLANT, NULL);
|
||||
FcPattern *pat = FcPatternBuild (NULL,
|
||||
FC_FAMILY, FcTypeString, fcfamily->family_name,
|
||||
NULL);
|
||||
-
|
||||
+
|
||||
+ /* Regular, Italic, Bold, Bold Italic */
|
||||
+ gboolean face_state [4] = { FALSE, FALSE, FALSE, FALSE };
|
||||
+ PangoFcFace **tmp_faces;
|
||||
+ gint num = 0;
|
||||
+
|
||||
fontset = FcFontList (NULL, pat, os);
|
||||
-
|
||||
+
|
||||
FcPatternDestroy (pat);
|
||||
FcObjectSetDestroy (os);
|
||||
-
|
||||
- fcfamily->n_faces = fontset->nfont;
|
||||
- fcfamily->faces = g_new (PangoFcFace *, fcfamily->n_faces);
|
||||
-
|
||||
+
|
||||
+ /* at most we have 3 additional artifical faces */
|
||||
+ tmp_faces = g_new (PangoFcFace *, fontset->nfont + 3);
|
||||
+
|
||||
for (i = 0; i < fontset->nfont; i++)
|
||||
{
|
||||
FcChar8 *s;
|
||||
FcResult res;
|
||||
|
||||
+ int weight, slant;
|
||||
+
|
||||
+ if (FcPatternGetInteger(fontset->fonts[i], FC_WEIGHT, 0, &weight) != FcResultMatch)
|
||||
+ weight = FC_WEIGHT_MEDIUM;
|
||||
+
|
||||
+ if (FcPatternGetInteger(fontset->fonts[i], FC_SLANT, 0, &slant) != FcResultMatch)
|
||||
+ slant = FC_SLANT_ROMAN;
|
||||
+
|
||||
res = FcPatternGetString (fontset->fonts[i], FC_STYLE, 0, &s);
|
||||
- if (res != FcResultMatch)
|
||||
- s = "Regular";
|
||||
|
||||
- fcfamily->faces[i] = create_face (fcfamily, s);
|
||||
+ if (weight <= FC_WEIGHT_MEDIUM && slant == FC_SLANT_ROMAN)
|
||||
+ {
|
||||
+ face_state[0] = TRUE;
|
||||
+ if (res != FcResultMatch) s = "Regular";
|
||||
+ }
|
||||
+ else if (weight <= FC_WEIGHT_MEDIUM && slant > FC_SLANT_ROMAN)
|
||||
+ {
|
||||
+ face_state[1] = TRUE;
|
||||
+ if (res != FcResultMatch) s = "Italic";
|
||||
+ }
|
||||
+ else if (weight > FC_WEIGHT_MEDIUM && slant == FC_SLANT_ROMAN)
|
||||
+ {
|
||||
+ face_state[2] = TRUE;
|
||||
+ if (res != FcResultMatch) s = "Bold";
|
||||
+ }
|
||||
+ else if (weight > FC_WEIGHT_MEDIUM && slant > FC_SLANT_ROMAN)
|
||||
+ {
|
||||
+ face_state[3] = TRUE;
|
||||
+ if (res != FcResultMatch) s = "Bold Italic";
|
||||
+ }
|
||||
+
|
||||
+ tmp_faces[num++] = create_face (fcfamily, s, FALSE);
|
||||
}
|
||||
|
||||
+ /* we need artifical Italic face */
|
||||
+ if (face_state[0] && !face_state[1])
|
||||
+ tmp_faces[num++] = create_face (fcfamily, "Italic", TRUE);
|
||||
+ /* we need artifical Bold face */
|
||||
+ if (face_state[0] && !face_state[2])
|
||||
+ tmp_faces[num++] = create_face (fcfamily, "Bold", TRUE);
|
||||
+ /* we need artifical Bold Italic face */
|
||||
+ if ((face_state[0] || face_state[1] || face_state[2]) && !face_state[3])
|
||||
+ tmp_faces[num++] = create_face (fcfamily, "Bold Italic", TRUE);
|
||||
+
|
||||
+ fcfamily->n_faces = num;
|
||||
+ fcfamily->faces = g_memdup (tmp_faces, num * sizeof (PangoFontFace *));
|
||||
+
|
||||
+ g_free (tmp_faces);
|
||||
+
|
||||
FcFontSetDestroy (fontset);
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:583060081538248775939c303aed80af1543de4b3472c316a556874437711156
|
||||
size 1288194
|
3
pango-1.15.6.tar.bz2
Normal file
3
pango-1.15.6.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bc27ebab8cfd6a04a8d4404d2975df1087f97e6388da50226a4b94465a2ef706
|
||||
size 1350544
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 16 15:06:24 CST 2007 - maw@suse.de
|
||||
|
||||
- Update to version 1.15.6
|
||||
- Remove bugzilla-53228-artificial-bold-and-italic.patch, which
|
||||
is now upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 17 16:31:37 CET 2007 - sbrabec@suse.cz
|
||||
|
||||
|
31
pango.spec
31
pango.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package pango (Version 1.14.5)
|
||||
# spec file for package pango (Version 1.15.6)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
@ -15,13 +15,14 @@ BuildRequires: cairo-devel gtk-doc perl-XML-Parser sgml-skel
|
||||
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
|
||||
Group: System/Libraries
|
||||
Autoreqprov: on
|
||||
Version: 1.14.5
|
||||
Release: 29
|
||||
Version: 1.15.6
|
||||
Release: 1
|
||||
Summary: System for Layout and Rendering of Internationalised Text
|
||||
Source: ftp://ftp.gnome.org/pub/GNOME/sources/pango/1.14/%{name}-%{version}.tar.bz2
|
||||
Source2: README.SuSE
|
||||
Patch: pango64.patch
|
||||
Patch2: bugzilla-53228-artificial-bold-and-italic.patch
|
||||
# This appears to be upstream now
|
||||
# Patch2: bugzilla-53228-artificial-bold-and-italic.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: filesystem
|
||||
%if %suse_version > 1010
|
||||
@ -85,7 +86,7 @@ Authors:
|
||||
cp -a %{S:2} .
|
||||
%patch
|
||||
%endif
|
||||
%patch2 -p1
|
||||
# %patch2 -p1
|
||||
|
||||
%build
|
||||
autoreconf -f -i
|
||||
@ -104,9 +105,10 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/pango/pango.modules\
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/pango/pango64.modules
|
||||
%endif
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/*/*/*/*.*a
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
# rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
sbin/ldconfig
|
||||
@ -143,12 +145,13 @@ fi
|
||||
%else
|
||||
%doc README AUTHORS COPYING ChangeLog
|
||||
%endif
|
||||
%doc examples/HELLO.utf8
|
||||
# evidently no longer exists
|
||||
# %doc examples/HELLO.utf8
|
||||
%{_bindir}/pango-*
|
||||
%dir %{_libdir}/pango
|
||||
%dir %{_libdir}/pango/1.5.0
|
||||
%dir %{_libdir}/pango/1.5.0/modules
|
||||
%{_libdir}/pango/1.5.0/modules/*.so
|
||||
%dir %{_libdir}/pango/1.6.0
|
||||
%dir %{_libdir}/pango/1.6.0/modules
|
||||
%{_libdir}/pango/1.6.0/modules/*.so
|
||||
%{_libdir}/lib*.so.*
|
||||
%doc %{_mandir}/man?/*.*
|
||||
%dir %{_sysconfdir}/pango
|
||||
@ -162,7 +165,7 @@ fi
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/lib*.*a
|
||||
# %{_libdir}/lib*.*a
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_includedir}/pango-1.0
|
||||
|
||||
@ -170,7 +173,11 @@ fi
|
||||
%defattr(-, root, root)
|
||||
%{_datadir}/gtk-doc/html/pango
|
||||
|
||||
%changelog -n pango
|
||||
%changelog
|
||||
* Fri Feb 16 2007 - maw@suse.de
|
||||
- Update to version 1.15.6
|
||||
- Remove bugzilla-53228-artificial-bold-and-italic.patch, which
|
||||
is now upstream.
|
||||
* Wed Jan 17 2007 - sbrabec@suse.cz
|
||||
- Use correct library instance in scriptlets (#235626).
|
||||
* Thu Dec 07 2006 - sbrabec@suse.cz
|
||||
|
Loading…
Reference in New Issue
Block a user