]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle `unspecified' values of symbolic font values on Haiku
authorPo Lu <luangruo@yahoo.com>
Thu, 17 Feb 2022 01:25:24 +0000 (01:25 +0000)
committerPo Lu <luangruo@yahoo.com>
Thu, 17 Feb 2022 01:25:24 +0000 (01:25 +0000)
* src/haikufont.c (haikufont_spec_or_entity_to_pattern): Handle
`unspecified' values of symbolic values.

src/haikufont.c

index e9e788e8e866a89ef11f9bb528a9d645731d7511..5099285f1003a662a70ec70cd369b728563a2dee 100644 (file)
@@ -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;