* bug#6303: 23.2; Win32 Antialiased fonts @ 2010-05-29 8:37 Damyan Pepper [not found] ` <handler.6303.B.12751485655057.ack@debbugs.gnu.org> 2010-07-01 16:07 ` bug#6303: W32 Antialiased fonts Damyan Pepper 0 siblings, 2 replies; 20+ messages in thread From: Damyan Pepper @ 2010-05-29 8:37 UTC (permalink / raw) To: 6303 I'm having trouble getting antialiased fonts to work correctly in emacs 23.2, to the extent that it appears that it doesn't actually support antialised fonts. If I do the following in emacs 23.1: (set-face-font 'default "DejaVu Sans Mono-9.0:antialias=subpixel") (describe-font nil) Then this reports the full name as "DejaVu Sans Mono-9.0:antialias=subpixel", and the font looks nice and smooth. However, doing the same thing in emacs 23.2 gives the full name as "DejaVu Sans Mono-9.0" and the font looks nasty and chunky. Using bzr bisect I've narrowed this down to revision 98629 - "Handle system default font and changing font parameters". This seems to add some new code for dealing with font changes. It looks like the 'antialias' argument is now recognised on non-win32 systems and so this may have inadvertently changed the way it behaves under windows. In GNU Emacs 23.2.1 (i386-mingw-nt5.2.3790) of 2010-05-08 on G41R2F1 Windowing system distributor `Microsoft Corp.', version 5.2.3790 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/xpm/include' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENG value of $XMODIFIERS: nil locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> M-x r e p o r t <tab> <ret urn> Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort mail-extr message ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process multi-tty emacs) ^ permalink raw reply [flat|nested] 20+ messages in thread
[parent not found: <handler.6303.B.12751485655057.ack@debbugs.gnu.org>]
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) [not found] ` <handler.6303.B.12751485655057.ack@debbugs.gnu.org> @ 2010-06-03 11:33 ` Damyan Pepper 2010-06-03 11:56 ` Damyan Pepper 2010-06-29 9:24 ` Juanma Barranquero 0 siblings, 2 replies; 20+ messages in thread From: Damyan Pepper @ 2010-06-03 11:33 UTC (permalink / raw) To: 6303 Damyan Pepper <damyanp@gmail.com> writes: > I'm having trouble getting antialiased fonts to work correctly in > emacs 23.2, to the extent that it appears that it doesn't actually > support antialised fonts. The problem here seems to be that the w32 font driver doesn't have a filter_properties function. I'm putting together a patch now to give it one - as far as I can tell this needs to be done to get the :script and :antialias properties to work. ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-03 11:33 ` bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) Damyan Pepper @ 2010-06-03 11:56 ` Damyan Pepper 2010-06-29 8:24 ` Damyan Pepper 2010-06-29 9:24 ` Juanma Barranquero 1 sibling, 1 reply; 20+ messages in thread From: Damyan Pepper @ 2010-06-03 11:56 UTC (permalink / raw) To: 6303 [-- Attachment #1: Type: text/plain, Size: 53 bytes --] Attached is a bzr bundle that should fix this issue. [-- Attachment #2: bugfix_6303.txt --] [-- Type: text/plain, Size: 5048 bytes --] # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: dpepper@sw-gbbr-brsd015-20100603115304-efdx2p1rxkr33nrw # target_branch: http://bzr.savannah.gnu.org/r/emacs/trunk/ # testament_sha1: 10916b73a779dc2471a1329e7952048079784c8e # timestamp: 2010-06-03 12:53:47 +0100 # base_revision_id: rgm@gnu.org-20100603055711-es6101poicnt5vec # # Begin patch === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-03 05:50:48 +0000 +++ src/ChangeLog 2010-06-03 11:53:04 +0000 @@ -1,3 +1,7 @@ +2010-06-03 Damyan Pepper <damyanp@gmail.com> + + * w32font.c (w32font_filter_properties): New function. + 2010-06-03 Glenn Morris <rgm@gnu.org> * m/template.h (NO_SOCK_SIGIO): Remove, no longer used. === modified file 'src/w32font.c' --- src/w32font.c 2010-01-13 08:35:10 +0000 +++ src/w32font.c 2010-06-03 11:53:04 +0000 @@ -2446,6 +2446,59 @@ return DECODE_SYSTEM (build_string (buf)); } +static const char *w32font_booleans [] = { + NULL, +}; + +static const char *w32font_non_booleans [] = { + ":script", + ":antialias", + NULL, +}; + +static void +w32font_filter_properties (font, alist) + Lisp_Object font; + Lisp_Object alist; +{ + Lisp_Object it; + int i; + + /* Set boolean values to Qt or Qnil */ + for (i = 0; w32font_booleans[i] != NULL; ++i) + for (it = alist; ! NILP (it); it = XCDR (it)) + { + Lisp_Object key = XCAR (XCAR (it)); + Lisp_Object val = XCDR (XCAR (it)); + char *keystr = SDATA (SYMBOL_NAME (key)); + + if (strcmp (w32font_booleans[i], keystr) == 0) + { + char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL; + if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false"; + if (str == NULL) str = "true"; + + val = Qt; + if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0 + || strcmp ("FALSE", str) == 0 || strcmp ("FcFalse", str) == 0 + || strcmp ("off", str) == 0 || strcmp ("OFF", str) == 0 + || strcmp ("Off", str) == 0) + val = Qnil; + Ffont_put (font, key, val); + } + } + + for (i = 0; w32font_non_booleans[i] != NULL; ++i) + for (it = alist; ! NILP (it); it = XCDR (it)) + { + Lisp_Object key = XCAR (XCAR (it)); + Lisp_Object val = XCDR (XCAR (it)); + char *keystr = SDATA (SYMBOL_NAME (key)); + if (strcmp (w32font_non_booleans[i], keystr) == 0) + Ffont_put (font, key, val); + } +} + struct font_driver w32font_driver = { 0, /* Qgdi */ @@ -2475,7 +2528,7 @@ NULL, /* shape */ NULL, /* check */ NULL, /* get_variation_glyphs */ - NULL, /* filter_properties */ + w32font_filter_properties, }; # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWbzoWoEAA4TfgFV0eH////+n /uq////+YAafdu7QAcnbcquwaCgEJFIQ1TzJpTxI0021Q9T1M8pG1MgA/SEBowGUeoBKJEPUNI80 QgaHqZDQaDQZABoDIZNGgw0jQ0mQZUAaNGgAAAAAAAAAOGhk00NMjQ0yMgyMjQyAxNGTQBkyMQxw 0MmmhpkaGmRkGRkaGQGJoyaAMmRiGEkggAmEGgFPVH4pqek2qeI9KbaiBnpEYRjSep+qTCFKcsPL zDaYxbO4/Ldx+Bu4cag1rgxY//wwWNAYeojOwrGzUF3HJGBUiBtAJgyBIxKxpux1ivppnYGAJKRi AaAOy3AVon5C0bldfL1pfjOrA06igxsjE6y4NDueeWhfXE1CQqR745G11FUFYiY1MIOfcm9y4jxz N7ZHM6jbVaomYcviOKh7G4lQPodMewtcZIDwFuKtql+tpZD25b8Y/4zZOshOaseeOqSkiV0O8Ovc jQQS8hPC6QgZ7cKKmvNSsRx7cePo+arkT6B0br5/8MdewzBmIFD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NhkY6D1C8/m85HqcXAULkLV 09Vq7Cs8pwBm9ixBGxHCQNAzMPwTKlFeQDuXmhkaPcl80hzF4uSqy+SrEWB/wgRu8AfZwcnZqAv0 oaKO9e03KXQNwESFfVF7r92MNMrBd86PBLEKCgQ3Z04zknsS2kpMMfoMZI/QDnpEMbwpR31PCHys LgBKLRCI8IhI6Q9iIsaFA1SmeW9BGKYIsoIMw6mCIM9cfIvTzmLuAcKUlZWsFSYBwyI4KNhfRBU7 d4WDzbeI2uFUzpeehTIyp+iIvgiVKYTg1ZkeCHrdZBV7RHpAsOCVG9hgiuoicFMj1J2sFx4KZs7F QozBuQ4tE97kGIG2K84DIUiIXEiDjMlVywUyHonrygp33IfUBIh0S0C8B6g8apjJk8JLaogR3A1c C9iwwQxOGd6XAmqHg7BTIw+w5u6MJ4wnMxDuA1mNAXU4jq2XRjKEgEQUXPUsBLqDwbDQFoNVLqmc tSMxZNSiRMAmzkjgr5bRPRqiWbbvMU4mbX6MxkDL2ILFkh9g5lQAw/Dwbc+elvW+DP57Z9WItCTm AiAnAbBnjCAYZFCv+n3moesX+gmRSSOB/xdyRThQkLzoWoE= ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-03 11:56 ` Damyan Pepper @ 2010-06-29 8:24 ` Damyan Pepper 2010-06-29 9:03 ` Juanma Barranquero 0 siblings, 1 reply; 20+ messages in thread From: Damyan Pepper @ 2010-06-29 8:24 UTC (permalink / raw) To: 6303 On Thu, Jun 3, 2010 at 12:56 PM, Damyan Pepper <damyanp@gmail.com> wrote: > Attached is a bzr bundle that should fix this issue. > Is there anything I need to do to get this committed, or should I just wait until someone gets round to it? ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-29 8:24 ` Damyan Pepper @ 2010-06-29 9:03 ` Juanma Barranquero 2010-06-29 9:05 ` Juanma Barranquero ` (2 more replies) 0 siblings, 3 replies; 20+ messages in thread From: Juanma Barranquero @ 2010-06-29 9:03 UTC (permalink / raw) To: Damyan Pepper; +Cc: 6303 On Tue, Jun 29, 2010 at 10:24, Damyan Pepper <damyanp@gmail.com> wrote: > Is there anything I need to do to get this committed, or should I just > wait until someone gets round to it? Could you provide an example of an antialiased font that works better with your patch? (Just to see the difference). Also, your contribution is long enought that it would likely require for you to sign papers. Have you done so? Another thing. This bit: char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL; if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false"; if (str == NULL) str = "true"; would perhaps be clearer as char *str; if (INTEGERP (val)) str = XINT (val) ? "true" : "false"; else if (SYMBOLP (val)) str = SDATA (SYMBOL_NAME (val)); else str = "true"; don't you agree? Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-29 9:03 ` Juanma Barranquero @ 2010-06-29 9:05 ` Juanma Barranquero 2010-06-29 9:28 ` Damyan Pepper 2010-08-20 21:58 ` bug#6303: Acknowledgement (23.2; Win32 " Stefan Monnier 2 siblings, 0 replies; 20+ messages in thread From: Juanma Barranquero @ 2010-06-29 9:05 UTC (permalink / raw) To: Damyan Pepper; +Cc: 6303 On Tue, Jun 29, 2010 at 11:03, Juanma Barranquero <lekktu@gmail.com> wrote: > Could you provide an example of an antialiased font that works better > with your patch? (Just to see the difference). Excuse the noise, I see that you already did that on the original report. Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-29 9:03 ` Juanma Barranquero 2010-06-29 9:05 ` Juanma Barranquero @ 2010-06-29 9:28 ` Damyan Pepper 2010-06-29 9:38 ` Juanma Barranquero 2010-08-20 21:58 ` bug#6303: Acknowledgement (23.2; Win32 " Stefan Monnier 2 siblings, 1 reply; 20+ messages in thread From: Damyan Pepper @ 2010-06-29 9:28 UTC (permalink / raw) To: Juanma Barranquero; +Cc: 6303 On Tue, Jun 29, 2010 at 10:03 AM, Juanma Barranquero <lekktu@gmail.com> wrote: Thanks for having a look at this. > Also, your contribution is long enought that it would likely require > for you to sign papers. Have you done so? I haven't. > Another thing. This bit: > > char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL; > if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false"; > if (str == NULL) str = "true"; > > would perhaps be clearer as > > char *str; > > if (INTEGERP (val)) > str = XINT (val) ? "true" : "false"; > else if (SYMBOLP (val)) > str = SDATA (SYMBOL_NAME (val)); > else > str = "true"; > > don't you agree? I do. I arranged for the code to be very similar to the code in ftfont.c - it's pretty much a copy with some renamings and a different list of properties. The idea was that it should be easy to refactor this so that the two versions share the same code but pass in different arrays of property names. Unfortunately I don't have access to a machine to test any changes to ftfont.c on and so wasn't confident to make it blind and without some guidance from someone more experience with the code base. I'm happy to try and do the refactor myself - perhaps moving the generic version of w32font_filter_properties/ftfont_filter_properties into font.h/font.c? At that point I'd be happier about doing a pass through to clear up any logic in there. ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-29 9:28 ` Damyan Pepper @ 2010-06-29 9:38 ` Juanma Barranquero 2010-06-29 10:07 ` Damyan Pepper 2010-06-29 20:10 ` bug#6303: Acknowledgement (23.2; Lose32 " Richard Stallman 0 siblings, 2 replies; 20+ messages in thread From: Juanma Barranquero @ 2010-06-29 9:38 UTC (permalink / raw) To: Damyan Pepper; +Cc: 6303 On Tue, Jun 29, 2010 at 11:28, Damyan Pepper <damyanp@gmail.com> wrote: > I haven't. Well, then I recommend you do (assuming you're not philosophically or legally unable to do it), because we need them to accept contributions larger than about 10 significant lines. > I arranged for the code to be very similar to the code in ftfont.c - > it's pretty much a copy with some renamings and a different list of > properties. Oh, I see. I didn't look at the ftfont.c code; but if it is like so, it's a bit obscure IMHO. > I'm happy to try and do the refactor myself - perhaps moving the > generic version of w32font_filter_properties/ftfont_filter_properties > into font.h/font.c? At that point I'd be happier about doing a pass > through to clear up any logic in there. Send the refactored patch, so we don't need to test two different ones. Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-29 9:38 ` Juanma Barranquero @ 2010-06-29 10:07 ` Damyan Pepper 2010-06-29 20:10 ` bug#6303: Acknowledgement (23.2; Lose32 " Richard Stallman 1 sibling, 0 replies; 20+ messages in thread From: Damyan Pepper @ 2010-06-29 10:07 UTC (permalink / raw) To: Juanma Barranquero; +Cc: 6303 On Tue, Jun 29, 2010 at 10:38 AM, Juanma Barranquero <lekktu@gmail.com> wrote: > Send the refactored patch, so we don't need to test two different ones. I'll do that. Thanks for the help, Damyan. ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Lose32 Antialiased fonts) 2010-06-29 9:38 ` Juanma Barranquero 2010-06-29 10:07 ` Damyan Pepper @ 2010-06-29 20:10 ` Richard Stallman 1 sibling, 0 replies; 20+ messages in thread From: Richard Stallman @ 2010-06-29 20:10 UTC (permalink / raw) To: Juanma Barranquero; +Cc: damyanp, 6303 Would you please not use the term "win" to refer to that pile of lossage? ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-29 9:03 ` Juanma Barranquero 2010-06-29 9:05 ` Juanma Barranquero 2010-06-29 9:28 ` Damyan Pepper @ 2010-08-20 21:58 ` Stefan Monnier 2010-08-20 22:00 ` Juanma Barranquero 2 siblings, 1 reply; 20+ messages in thread From: Stefan Monnier @ 2010-08-20 21:58 UTC (permalink / raw) To: Juanma Barranquero; +Cc: Damyan Pepper, 6303 > Another thing. This bit: > char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL; > if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false"; > if (str == NULL) str = "true"; > would perhaps be clearer as > char *str; > if (INTEGERP (val)) > str = XINT (val) ? "true" : "false"; > else if (SYMBOLP (val)) > str = SDATA (SYMBOL_NAME (val)); > else > str = "true"; Actually, I'd write it: char *str = (INTEGERP (val) ? (XINT (val) ? "true" : "false") : SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : "true") -- Stefan "look'ma! no assignment!" ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-08-20 21:58 ` bug#6303: Acknowledgement (23.2; Win32 " Stefan Monnier @ 2010-08-20 22:00 ` Juanma Barranquero 0 siblings, 0 replies; 20+ messages in thread From: Juanma Barranquero @ 2010-08-20 22:00 UTC (permalink / raw) To: Stefan Monnier; +Cc: Damyan Pepper, 6303 On Fri, Aug 20, 2010 at 23:58, Stefan Monnier <monnier@iro.umontreal.ca> wrote: > Actually, I'd write it: > > char *str = (INTEGERP (val) ? (XINT (val) ? "true" : "false") > : SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) > : "true") > I'm all for that kind of thing, but I'm not sure I actually find it more readable (more "elegant", for some definition of elegant, yes). Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) 2010-06-03 11:33 ` bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) Damyan Pepper 2010-06-03 11:56 ` Damyan Pepper @ 2010-06-29 9:24 ` Juanma Barranquero 1 sibling, 0 replies; 20+ messages in thread From: Juanma Barranquero @ 2010-06-29 9:24 UTC (permalink / raw) To: Damyan Pepper; +Cc: 6303 On Thu, Jun 3, 2010 at 13:33, Damyan Pepper <damyanp@gmail.com> wrote: > I'm putting together a patch now to give it one - as far as I can tell > this needs to be done to get the :script and :antialias properties to > work. Yes, the patch works (at least for :antialias, I didn't test :script), though of course you need to deactivate ClearType to see it. Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: W32 Antialiased fonts 2010-05-29 8:37 bug#6303: 23.2; Win32 Antialiased fonts Damyan Pepper [not found] ` <handler.6303.B.12751485655057.ack@debbugs.gnu.org> @ 2010-07-01 16:07 ` Damyan Pepper 2010-07-02 8:59 ` Juanma Barranquero 2010-08-12 13:59 ` Damyan Pepper 1 sibling, 2 replies; 20+ messages in thread From: Damyan Pepper @ 2010-07-01 16:07 UTC (permalink / raw) To: Juanma Barranquero; +Cc: 6303 [-- Attachment #1: Type: text/plain, Size: 588 bytes --] > On Tue, Jun 29, 2010 at 10:38 AM, Juanma Barranquero <lekktu@gmail.com> wrote: >> Send the refactored patch, so we don't need to test two different ones. Attached is the refactored patch. I've moved the implementation of ftfont_filter_properties into font_filter_properties, also applying the cleanup you suggested. ftfont_filter_properties now calls this new function. Added w32font_filter_properties. I'm afraid I've not been able to test this in an environment that uses ftfont. Are you able to advise me on how to go about getting hold of the papers to sign? Regards, Damyan. [-- Attachment #2: bugfix_6303-v2.txt --] [-- Type: text/plain, Size: 10578 bytes --] # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: dpepper@sw-gbbr-brsd015-20100701155900-jpejfg0c2hm1ruhp # target_branch: http://bzr.savannah.gnu.org/r/emacs/trunk/ # testament_sha1: 00e5e10c74ec1a385bf3916399c1c3a9b75cf656 # timestamp: 2010-07-01 17:00:50 +0100 # base_revision_id: jan.h.d@swipnet.se-20100629094920-iq2l9ojeiqiq41n8 # # Begin patch === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-29 09:49:20 +0000 +++ src/ChangeLog 2010-07-01 15:59:00 +0000 @@ -1,3 +1,11 @@ +2010-07-01 Damyan Pepper <damyanp@gmail.com> + + * gtfont.c (gtfont_filter_properties): Now calls + font_filter_properties. + * font.c (font_filter_properties): New function, refactored from + gtfont_filter_properties. + * w32font.c (w32font_filter_properties): New function (Bug#6303). + 2010-06-29 Jan Djärv <jan.h.d@swipnet.se> * nsfns.m: extern declare Vmenu_bar_mode, Vtool_bar_mode. === modified file 'src/font.c' --- src/font.c 2010-06-22 06:42:00 +0000 +++ src/font.c 2010-07-01 15:54:59 +0000 @@ -3895,6 +3895,62 @@ } +/* Sets attributes on a font. Any properties that appear in ALIST and + BOOLEAN_PROPERTIES or NON_BOOLEAN_PROPERTIES are set on the font. + BOOLEAN_PROPERTIES and NON_BOOLEAN_PROPERTIES are NULL-terminated + arrays of strings. This function is intended for use by the font + drivers to implement their specific font_filter_properties. */ +void +font_filter_properties (font, alist, boolean_properties, non_boolean_properties) + Lisp_Object font; + Lisp_Object alist; + const char *boolean_properties[]; + const char *non_boolean_properties[]; +{ + Lisp_Object it; + int i; + + /* Set boolean values to Qt or Qnil */ + for (i = 0; boolean_properties[i] != NULL; ++i) + for (it = alist; ! NILP (it); it = XCDR (it)) + { + Lisp_Object key = XCAR (XCAR (it)); + Lisp_Object val = XCDR (XCAR (it)); + char *keystr = SDATA (SYMBOL_NAME (key)); + + if (strcmp (boolean_properties[i], keystr) == 0) + { + char *str; + + if (INTEGERP (val)) + str = XINT (val) != 0 ? "true" : "false"; + else if (SYMBOLP (val)) + str = SDATA (SYMBOL_NAME (val)); + else + str = "true"; + + val = Qt; + if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0 + || strcmp ("FALSE", str) == 0 || strcmp ("FcFalse", str) == 0 + || strcmp ("off", str) == 0 || strcmp ("OFF", str) == 0 + || strcmp ("Off", str) == 0) + val = Qnil; + Ffont_put (font, key, val); + } + } + + for (i = 0; non_boolean_properties[i] != NULL; ++i) + for (it = alist; ! NILP (it); it = XCDR (it)) + { + Lisp_Object key = XCAR (XCAR (it)); + Lisp_Object val = XCDR (XCAR (it)); + char *keystr = SDATA (SYMBOL_NAME (key)); + if (strcmp (non_boolean_properties[i], keystr) == 0) + Ffont_put (font, key, val); + } +} + + /* Return the font used to draw character C by FACE at buffer position POS in window W. If STRING is non-nil, it is a string containing C at index POS. If C is negative, get C from the current buffer or === modified file 'src/font.h' --- src/font.h 2010-01-13 08:35:10 +0000 +++ src/font.h 2010-07-01 15:54:59 +0000 @@ -814,6 +814,11 @@ extern void *font_get_frame_data P_ ((FRAME_PTR f, struct font_driver *driver)); +extern void font_filter_properties P_ ((Lisp_Object font, + Lisp_Object alist, + const char *boolean_properties[], + const char *non_boolean_properties[])); + #ifdef HAVE_FREETYPE extern struct font_driver ftfont_driver; #endif /* HAVE_FREETYPE */ === modified file 'src/ftfont.c' --- src/ftfont.c 2010-05-11 11:15:29 +0000 +++ src/ftfont.c 2010-07-01 15:54:59 +0000 @@ -2681,42 +2681,7 @@ Lisp_Object font; Lisp_Object alist; { - Lisp_Object it; - int i; - - /* Set boolean values to Qt or Qnil */ - for (i = 0; ftfont_booleans[i] != NULL; ++i) - for (it = alist; ! NILP (it); it = XCDR (it)) - { - Lisp_Object key = XCAR (XCAR (it)); - Lisp_Object val = XCDR (XCAR (it)); - char *keystr = SDATA (SYMBOL_NAME (key)); - - if (strcmp (ftfont_booleans[i], keystr) == 0) - { - char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL; - if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false"; - if (str == NULL) str = "true"; - - val = Qt; - if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0 - || strcmp ("FALSE", str) == 0 || strcmp ("FcFalse", str) == 0 - || strcmp ("off", str) == 0 || strcmp ("OFF", str) == 0 - || strcmp ("Off", str) == 0) - val = Qnil; - Ffont_put (font, key, val); - } - } - - for (i = 0; ftfont_non_booleans[i] != NULL; ++i) - for (it = alist; ! NILP (it); it = XCDR (it)) - { - Lisp_Object key = XCAR (XCAR (it)); - Lisp_Object val = XCDR (XCAR (it)); - char *keystr = SDATA (SYMBOL_NAME (key)); - if (strcmp (ftfont_non_booleans[i], keystr) == 0) - Ffont_put (font, key, val); - } + font_filter_properties (font, alist, ftfont_booleans, ftfont_non_booleans); } === modified file 'src/w32font.c' --- src/w32font.c 2010-01-13 08:35:10 +0000 +++ src/w32font.c 2010-07-01 15:54:59 +0000 @@ -2446,6 +2446,24 @@ return DECODE_SYSTEM (build_string (buf)); } +static const char *w32font_booleans [] = { + NULL, +}; + +static const char *w32font_non_booleans [] = { + ":script", + ":antialias", + NULL, +}; + +static void +w32font_filter_properties (font, alist) + Lisp_Object font; + Lisp_Object alist; +{ + font_filter_properties (font, alist, w32font_booleans, w32font_non_booleans); +} + struct font_driver w32font_driver = { 0, /* Qgdi */ @@ -2475,7 +2493,7 @@ NULL, /* shape */ NULL, /* check */ NULL, /* get_variation_glyphs */ - NULL, /* filter_properties */ + w32font_filter_properties, }; # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWQz5QeMACo9fgHV0fH////+n /uq////+YA7nZ985pywbmw1oKGgCOrhp0kttm3s9T2UhaDe7uta61wyKp+qP1T1PTU9TGo2iY1Gm TTTIGjQyNAZBgRoYmgSUAJppqeiZCmjU9NSemo8o00NonqGeqGgDQAAHGTBNDIZGRk0NAGgyMIBo NGmQxDQASIkERDPSaJpmkxNpP1R6I00AAABoNMjQAiiIEKn5MampptNGpPKeo02oxqZD1HqANGgZ BoDQKkkIBoIyBMKeSNJ7U2k0AaMoaepoaNqBiMmkWsHEJhQAAqAd0eclkM5rfnAtNP5qOkoFi3qC q63VA1FicDCWMxvUaLv0KebTRciJKbpB9ajj4EoiMqoEAgEH9BgaDboDCSYBklYsSu4i6bbNWFOc Zqmyp0eF+jRauZxB2uzzXq6qBD50g1s3GMt3E3KdWuT5tdSDWwHqDxzjBfK5uYIJJLkwQBJiCFO5 UKlES0pKnCz8llz59eBfesNBeecKnhOs6z0VeUX8fV6X4x8wFnthzh6ThDGAtB8wbAvyL5yrWIre R6jRgDsDlKHlAxG8e+EMaG2xsBtjbgSxMOQS0bnWDW7hi+urLO7u0VrKhw7FMJkRbSKMqLILLSLY tZN+vXNoys+x7m5xjQbyyfoWNxco7WVC7StvzjvhfXp0ODckGG1aisodkYsrPGsECVhZ5c2i0yoN zilltsle3wmgfwurFuGCpBL5NCShWXWSE5/NrJ2nsYWixVqWznszh1ihvqFBZgd4EGvb4xaR3YZT AxRqRo/uHiX/gW0QDKdcnB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zpkPFhjuC+bd4wRRKuDzZJeZAO EdZSHVeWwaFa0QkCbKt4jJnuSbpn71yHcJTiQ7OPMU7p9tyc1JiNb69gnovA9xAO8BgvIBdc0HPd AemkiK8xSF05XqU7rmrNT13L6Xd7xROly7kNrGGIDxiNFYhLN6OkEvEICjjdQCg+6nLcNGdC6oXT tYRPIe1xcFfmT9VkouYFQyD/i7kinChIBnyg8YA= ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: W32 Antialiased fonts 2010-07-01 16:07 ` bug#6303: W32 Antialiased fonts Damyan Pepper @ 2010-07-02 8:59 ` Juanma Barranquero 2010-07-02 17:15 ` Glenn Morris 2010-08-12 13:59 ` Damyan Pepper 1 sibling, 1 reply; 20+ messages in thread From: Juanma Barranquero @ 2010-07-02 8:59 UTC (permalink / raw) To: Damyan Pepper; +Cc: 6303 On Thu, Jul 1, 2010 at 18:07, Damyan Pepper <damyanp@gmail.com> wrote: > Attached is the refactored patch. Thanks. > I'm afraid I've not been able to test this in an environment that uses ftfont. I'll try it, but I don't think there will be any shortage of testers for the non-Windows parts of the change ;-) > Are you able to advise me on how to go about getting hold of the papers to sign? Glenn knows about that more than I do. I'm Cc:ing him. Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: W32 Antialiased fonts 2010-07-02 8:59 ` Juanma Barranquero @ 2010-07-02 17:15 ` Glenn Morris 2010-07-02 17:29 ` Juanma Barranquero 0 siblings, 1 reply; 20+ messages in thread From: Glenn Morris @ 2010-07-02 17:15 UTC (permalink / raw) To: Juanma Barranquero; +Cc: Damyan Pepper, 6303 >> Are you able to advise me on how to go about getting hold of the >> papers to sign? Sent off-list. ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: W32 Antialiased fonts 2010-07-02 17:15 ` Glenn Morris @ 2010-07-02 17:29 ` Juanma Barranquero 0 siblings, 0 replies; 20+ messages in thread From: Juanma Barranquero @ 2010-07-02 17:29 UTC (permalink / raw) To: Glenn Morris; +Cc: Damyan Pepper, 6303 On Fri, Jul 2, 2010 at 19:15, Glenn Morris <rgm@gnu.org> wrote: > Sent off-list. Thanks. Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: W32 Antialiased fonts 2010-07-01 16:07 ` bug#6303: W32 Antialiased fonts Damyan Pepper 2010-07-02 8:59 ` Juanma Barranquero @ 2010-08-12 13:59 ` Damyan Pepper 2010-08-12 18:33 ` Juanma Barranquero 1 sibling, 1 reply; 20+ messages in thread From: Damyan Pepper @ 2010-08-12 13:59 UTC (permalink / raw) To: Juanma Barranquero; +Cc: 6303 Just to let you know, my signed papers have been received by the FSF. Regards, Damyan. ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: W32 Antialiased fonts 2010-08-12 13:59 ` Damyan Pepper @ 2010-08-12 18:33 ` Juanma Barranquero 2010-10-13 14:08 ` Juanma Barranquero 0 siblings, 1 reply; 20+ messages in thread From: Juanma Barranquero @ 2010-08-12 18:33 UTC (permalink / raw) To: Damyan Pepper; +Cc: 6303 On Thu, Aug 12, 2010 at 15:59, Damyan Pepper <damyanp@gmail.com> wrote: > Just to let you know, my signed papers have been received by the FSF. Great. I'll install your change as soon as possible. Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#6303: W32 Antialiased fonts 2010-08-12 18:33 ` Juanma Barranquero @ 2010-10-13 14:08 ` Juanma Barranquero 0 siblings, 0 replies; 20+ messages in thread From: Juanma Barranquero @ 2010-10-13 14:08 UTC (permalink / raw) To: Damyan Pepper; +Cc: 6303-done On Thu, Aug 12, 2010 at 20:33, Juanma Barranquero <lekktu@gmail.com> wrote: > Great. I'll install your change as soon as possible. Well, perhaps not "as soon as possible", but it is now committed to emacs-23, and will be in the trunk in a few days. Thanks, Juanma ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2010-10-13 14:08 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-29 8:37 bug#6303: 23.2; Win32 Antialiased fonts Damyan Pepper [not found] ` <handler.6303.B.12751485655057.ack@debbugs.gnu.org> 2010-06-03 11:33 ` bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts) Damyan Pepper 2010-06-03 11:56 ` Damyan Pepper 2010-06-29 8:24 ` Damyan Pepper 2010-06-29 9:03 ` Juanma Barranquero 2010-06-29 9:05 ` Juanma Barranquero 2010-06-29 9:28 ` Damyan Pepper 2010-06-29 9:38 ` Juanma Barranquero 2010-06-29 10:07 ` Damyan Pepper 2010-06-29 20:10 ` bug#6303: Acknowledgement (23.2; Lose32 " Richard Stallman 2010-08-20 21:58 ` bug#6303: Acknowledgement (23.2; Win32 " Stefan Monnier 2010-08-20 22:00 ` Juanma Barranquero 2010-06-29 9:24 ` Juanma Barranquero 2010-07-01 16:07 ` bug#6303: W32 Antialiased fonts Damyan Pepper 2010-07-02 8:59 ` Juanma Barranquero 2010-07-02 17:15 ` Glenn Morris 2010-07-02 17:29 ` Juanma Barranquero 2010-08-12 13:59 ` Damyan Pepper 2010-08-12 18:33 ` Juanma Barranquero 2010-10-13 14:08 ` Juanma Barranquero
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).