emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9780972a44 1/2: Handle `unspecified' values of symbolic font valu


From: Po Lu
Subject: master 9780972a44 1/2: Handle `unspecified' values of symbolic font values on Haiku
Date: Wed, 16 Feb 2022 20:28:14 -0500 (EST)

branch: master
commit 9780972a443d2485cb51ea35d699614ce33cf914
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Handle `unspecified' values of symbolic font values on Haiku
    
    * src/haikufont.c (haikufont_spec_or_entity_to_pattern): Handle
    `unspecified' values of symbolic values.
---
 src/haikufont.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/haikufont.c b/src/haikufont.c
index e9e788e8e8..5099285f10 100644
--- a/src/haikufont.c
+++ b/src/haikufont.c
@@ -440,35 +440,35 @@ haikufont_spec_or_entity_to_pattern (Lisp_Object ent,
     }
 
   tem = FONT_SLANT_SYMBOLIC (ent);
-  if (!NILP (tem))
+  if (!NILP (tem) && !EQ (tem, Qunspecified))
     {
       ptn->specified |= FSPEC_SLANT;
       ptn->slant = haikufont_lisp_to_slant (tem);
     }
 
   tem = FONT_WEIGHT_SYMBOLIC (ent);
-  if (!NILP (tem))
+  if (!NILP (tem) && !EQ (tem, Qunspecified))
     {
       ptn->specified |= FSPEC_WEIGHT;
       ptn->weight = haikufont_lisp_to_weight (tem);
     }
 
   tem = FONT_WIDTH_SYMBOLIC (ent);
-  if (!NILP (tem))
+  if (!NILP (tem) && !EQ (tem, Qunspecified))
     {
       ptn->specified |= FSPEC_WIDTH;
       ptn->width = haikufont_lisp_to_width (tem);
     }
 
   tem = AREF (ent, FONT_SPACING_INDEX);
-  if (FIXNUMP (tem))
+  if (!NILP (tem) && !EQ (tem, Qunspecified))
     {
       ptn->specified |= FSPEC_SPACING;
       ptn->mono_spacing_p = XFIXNUM (tem) != FONT_SPACING_PROPORTIONAL;
     }
 
   tem = AREF (ent, FONT_FAMILY_INDEX);
-  if (!NILP (tem) &&
+  if (!NILP (tem) && !EQ (tem, Qunspecified) &&
       (list_p && !haikufont_maybe_handle_special_family (tem, ptn)))
     {
       ptn->specified |= FSPEC_FAMILY;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]