diff --git a/src/__init__.py b/src/__init__.py index f00296cb6..b013ef309 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -13507,6 +13507,7 @@ def width(self): TEXT_COLLECT_VECTORS = 1024 TEXT_IGNORE_ACTUALTEXT = 2048 TEXT_STEXT_SEGMENT = 4096 +TEXT_COLLECT_FLAGS = 32768 # mupdf.FZ_STEXT_COLLECT_FLAGS TEXTFLAGS_WORDS = (0 | TEXT_PRESERVE_LIGATURES diff --git a/src/extra.i b/src/extra.i index e040e5dad..ce214b2bb 100644 --- a/src/extra.i +++ b/src/extra.i @@ -3125,7 +3125,7 @@ mupdf::FzRect JM_make_spanlist( DICT_SETITEMSTR_DROP(span, "opacity", Py_BuildValue("f", style.opacity)); #endif - // rest of keys only make sense if FZ_STEXT_COLLECT_FLAGS was set + // rest of keys only make sense if FZ_STEXT_COLLECT_FLAGS (32768) was set #if (THIS_MUPDF >= MUPDF1250) if (dev_flags & 32768) { @@ -3139,9 +3139,9 @@ mupdf::FzRect JM_make_spanlist( } #endif #if (THIS_MUPDF > MUPDF1251) - if (dev_flags & FZ_STEXT_COLLECT_FLAGS) + if (dev_flags & 32768) // FZ_STEXT_COLLECT_FLAGS = 32768 { - DICT_SETITEMSTR_DROP(span, "bold", JM_BOOL(style.flags & FZ_STEXT_BOLD)); + DICT_SETITEMSTR_DROP(span, "bold", JM_BOOL(style.flags & 8)); // FZ_STEXT_BOLD = 8 } else {