Fixed handling of dual spacing fonts

This commit is contained in:
Karel Klíč 2010-06-03 10:26:51 +00:00
parent 12b3cf530e
commit c094eb1aaf
2 changed files with 33 additions and 2 deletions

26
emacs-23.2-spacing.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/src/ftfont.c b/src/ftfont.c
index 4ebc4be..bac9a4f 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1262,7 +1262,7 @@ ftfont_open (f, entity, pixel_size)
spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
else
spacing = FC_PROPORTIONAL;
- if (spacing != FC_PROPORTIONAL)
+ if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL)
font->min_width = font->average_width = font->space_width
= (scalable ? ft_face->max_advance_width * size / upEM
: ft_face->size->metrics.max_advance >> 6);
diff --git a/src/xftfont.c b/src/xftfont.c
index 82701ce..e74ce31 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -418,7 +418,7 @@ xftfont_open (f, entity, pixel_size)
ascii_printable[i] = ' ' + i;
}
BLOCK_INPUT;
- if (spacing != FC_PROPORTIONAL)
+ if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL)
{
font->min_width = font->average_width = font->space_width
= xftfont->max_advance_width;

View File

@ -4,7 +4,7 @@ Summary: GNU Emacs text editor
Name: emacs
Epoch: 1
Version: 23.2
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors
@ -33,7 +33,8 @@ Patch5: emacs-23.2-m17ncheck.patch
# Fix rhbz#595546
# Upstream: http://emacsbugs.donarmstrong.com/cgi/bugreport.cgi?bug=6158
Patch6: emacs-23.2-hideshow-comment.patch
# Reported upstream http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4129
Patch7: emacs-23.2-spacing.patch
BuildRequires: atk-devel, cairo-devel, desktop-file-utils, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel
@ -141,6 +142,7 @@ Emacs packages or see some elisp examples.
%patch4 -p1 -b .xdg
%patch5 -p1 -b .m17ncheck
%patch6 -p0 -b .hideshow-comment
%patch7 -p1 -b .spacing
# Install site-lisp files
cp %SOURCE7 %SOURCE9 %SOURCE10 site-lisp
@ -404,6 +406,9 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
%dir %{_datadir}/emacs/%{version}
%changelog
* Thu Jun 3 2010 Karel Klic <kklic@redhat.com> - 1:23.2-5
- Fixed handling of dual spacing fonts rhbz#599437
* Thu May 27 2010 Karel Klíč <karel@agata> - 1:23.2-4
- Add patch to fix rhbz#595546 hideshow library matches wrong parenthesis
under certain circumstances