Skip to content

Instantly share code, notes, and snippets.

@fmthoma
Last active November 18, 2017 18:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmthoma/7e8dd23c12b55cae6474 to your computer and use it in GitHub Desktop.
Save fmthoma/7e8dd23c12b55cae6474 to your computer and use it in GitHub Desktop.
diff --git a/src/rxvtfont.C b/src/rxvtfont.C
index 4b266bd..99130fa 100644
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -1326,31 +1326,7 @@ bool
rxvt_font_xft::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &careful) const
{
careful = false;
-
- if (!XftCharExists (term->dpy, f, unicode))
- return false;
-
- if (!prop || prop->width == rxvt_fontprop::unset)
- return true;
-
- // check character against base font bounding box
- FcChar32 ch = unicode;
- XGlyphInfo g;
- XftTextExtents32 (term->dpy, f, &ch, 1, &g);
-
- int w = g.width - g.x;
- int wcw = max (WCWIDTH (unicode), 1);
-
- careful = g.x > 0 || w > prop->width * wcw;
-
- if (careful && !OVERLAP_OK (w, wcw, prop))
- return false;
-
- // this weeds out _totally_ broken fonts, or glyphs
- if (!OVERLAP_OK (g.xOff, wcw, prop))
- return false;
-
- return true;
+ return XftCharExists (term->dpy, f, unicode);
}
void
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment