Fix for #517272
This commit is contained in:
parent
1de5c1cc99
commit
2b04b01986
44
emacs-23.1-fontdpi.patch
Normal file
44
emacs-23.1-fontdpi.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff -up emacs-23.1/src/xterm.c.fontdpi emacs-23.1/src/xterm.c
|
||||
--- emacs-23.1/src/xterm.c.fontdpi 2010-01-04 09:11:45.000000000 +0100
|
||||
+++ emacs-23.1/src/xterm.c 2010-01-04 11:50:19.627777180 +0100
|
||||
@@ -10380,17 +10380,31 @@ x_term_init (display_name, xrm_option, r
|
||||
dpyinfo->visual, AllocNone);
|
||||
|
||||
{
|
||||
- int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
|
||||
- double pixels = DisplayHeight (dpyinfo->display, screen_number);
|
||||
- double mm = DisplayHeightMM (dpyinfo->display, screen_number);
|
||||
- /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
|
||||
- dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm;
|
||||
- pixels = DisplayWidth (dpyinfo->display, screen_number);
|
||||
- mm = DisplayWidthMM (dpyinfo->display, screen_number);
|
||||
- /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
|
||||
- dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
|
||||
+ /* If we are using Xft, check dpi value in X resources.
|
||||
+ It is better we use it as well, since Xft will use it, as will all
|
||||
+ Gnome applications. If our real DPI is smaller or larger than the
|
||||
+ one Xft uses, our font will look smaller or larger than other
|
||||
+ for other applications, even if it is the same font name (monospace-10
|
||||
+ for example). */
|
||||
+ char *v = XGetDefault (dpyinfo->display, "Xft", "dpi");
|
||||
+ double d;
|
||||
+ if (v != NULL && sscanf (v, "%lf", &d) == 1)
|
||||
+ dpyinfo->resy = dpyinfo->resx = d;
|
||||
}
|
||||
|
||||
+ if (dpyinfo->resy < 1)
|
||||
+ {
|
||||
+ int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
|
||||
+ double pixels = DisplayHeight (dpyinfo->display, screen_number);
|
||||
+ double mm = DisplayHeightMM (dpyinfo->display, screen_number);
|
||||
+ /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
|
||||
+ dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm;
|
||||
+ pixels = DisplayWidth (dpyinfo->display, screen_number);
|
||||
+ mm = DisplayWidthMM (dpyinfo->display, screen_number);
|
||||
+ /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
|
||||
+ dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
|
||||
+ }
|
||||
+
|
||||
dpyinfo->Xatom_wm_protocols
|
||||
= XInternAtom (dpyinfo->display, "WM_PROTOCOLS", False);
|
||||
dpyinfo->Xatom_wm_take_focus
|
10
emacs.spec
10
emacs.spec
@ -4,7 +4,7 @@ Summary: GNU Emacs text editor
|
||||
Name: emacs
|
||||
Epoch: 1
|
||||
Version: 23.1
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/emacs/
|
||||
Group: Applications/Editors
|
||||
@ -34,6 +34,10 @@ Patch7: emacs-23.1-scroll.patch
|
||||
Patch8: emacs-23.1-indian.patch
|
||||
# Fixed in upstream CVS
|
||||
Patch9: emacs-23.1-memmove.patch
|
||||
# Taken from upstream GIT repository
|
||||
# http://git.savannah.gnu.org/cgit/emacs.git/diff/src/xsettings.c?id=b3a25b88e82569f916712c635207c8bdd590e13b
|
||||
# rhbz#517272
|
||||
Patch10: emacs-23.1-fontdpi.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: atk-devel, cairo-devel, desktop-file-utils, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
|
||||
@ -133,6 +137,7 @@ Emacs packages or see some elisp examples.
|
||||
%patch7 -p1 -b .scroll
|
||||
%patch8 -p1
|
||||
%patch9 -p1 -b .memmove
|
||||
%patch10 -p1 -b .fontdpi
|
||||
|
||||
# install rest of site-lisp files
|
||||
( cd site-lisp
|
||||
@ -404,6 +409,9 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
|
||||
%dir %{_datadir}/emacs/%{version}
|
||||
|
||||
%changelog
|
||||
* Mon Jan 4 2010 Karel Klic <kklic@redhat.com> 1:23.1-18
|
||||
- Fixed rhbz#517272 - emacs-23.1 update shows fonts in double the normal size
|
||||
|
||||
* Tue Dec 8 2009 Karel Klic <kklic@redhat.com> 1:23.1-17
|
||||
- Fixed rhbz#545398 - ETags messes up filenames
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user