Skip to content

Commit

Permalink
Merge branch 'faster'
Browse files Browse the repository at this point in the history
Results in 5x to 10x speedup in scanning.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=64766
  • Loading branch information
behdad committed Sep 12, 2017
2 parents 339de16 + 8b46a51 commit c524522
Show file tree
Hide file tree
Showing 23 changed files with 180 additions and 1,586 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Expand Up @@ -21,7 +21,7 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

SUBDIRS=fontconfig fc-blanks fc-case fc-lang fc-glyphname src \
SUBDIRS=fontconfig fc-case fc-lang src \
fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
fc-validate conf.d test
if ENABLE_DOCS
Expand Down
2 changes: 0 additions & 2 deletions configure.ac
Expand Up @@ -760,8 +760,6 @@ AC_CONFIG_FILES([
Makefile
fontconfig/Makefile
fc-lang/Makefile
fc-glyphname/Makefile
fc-blanks/Makefile
fc-case/Makefile
src/Makefile
conf.d/Makefile
Expand Down
14 changes: 8 additions & 6 deletions doc/fcblanks.fncs
Expand Up @@ -26,15 +26,17 @@
@TYPE1@ void
@PURPOSE@ Create an FcBlanks
@DESC@
Creates an empty FcBlanks object.
FcBlanks is deprecated.
This function always returns NULL.
@@

@RET@ void
@FUNC@ FcBlanksDestroy
@TYPE1@ FcBlanks * @ARG1@ b
@PURPOSE@ Destroy and FcBlanks
@DESC@
Destroys an FcBlanks object, freeing any associated memory.
FcBlanks is deprecated.
This function does nothing.
@@

@RET@ FcBool
Expand All @@ -43,8 +45,8 @@ Destroys an FcBlanks object, freeing any associated memory.
@TYPE2@ FcChar32% @ARG2@ ucs4
@PURPOSE@ Add a character to an FcBlanks
@DESC@
Adds a single character to an FcBlanks object, returning FcFalse
if this process ran out of memory.
FcBlanks is deprecated.
This function always returns FALSE.
@@

@RET@ FcBool
Expand All @@ -53,6 +55,6 @@ if this process ran out of memory.
@TYPE2@ FcChar32% @ARG2@ ucs4
@PURPOSE@ Query membership in an FcBlanks
@DESC@
Returns whether the specified FcBlanks object contains the indicated Unicode
value.
FcBlanks is deprecated.
This function always returns FALSE.
@@
7 changes: 2 additions & 5 deletions doc/fcconfig.fncs
Expand Up @@ -181,11 +181,8 @@ If <parameter>config</parameter> is NULL, the current configuration is used.
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Get config blanks
@DESC@
Returns the FcBlanks object associated with the given configuration, if no
blanks were present in the configuration, this function will return 0.
The returned FcBlanks object if not NULL, is valid as long as the owning
FcConfig is alive.
If <parameter>config</parameter> is NULL, the current configuration is used.
FcBlanks is deprecated.
This function always returns NULL.
@@

@RET@ int
Expand Down
17 changes: 9 additions & 8 deletions doc/fcfreetype.fncs
Expand Up @@ -47,10 +47,9 @@ higher level functions.
@TYPE2@ FcBlanks * @ARG2@ blanks
@PURPOSE@ compute Unicode coverage
@DESC@
Scans a FreeType face and returns the set of encoded Unicode chars. This scans
several encoding tables to build as complete a list as possible.
If 'blanks' is not 0, the glyphs in the font are examined and any blank glyphs
not in 'blanks' are not placed in the returned FcCharSet.
Scans a FreeType face and returns the set of encoded Unicode chars.
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
accepted only for compatibility with older code.
@@

@SYNOPSIS@
Expand All @@ -64,10 +63,8 @@ not in 'blanks' are not placed in the returned FcCharSet.
@PURPOSE@ compute Unicode coverage and spacing type
@DESC@
Scans a FreeType face and returns the set of encoded Unicode chars.
This scans
several encoding tables to build as complete a list as possible.
If 'blanks' is not 0, the glyphs in the font are examined and any blank glyphs
not in 'blanks' are not placed in the returned FcCharSet.
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
accepted only for compatibility with older code.
<parameter>spacing</parameter> receives the computed spacing type of the
font, one of FC_MONO for a font where all glyphs have the same width,
FC_DUAL, where the font has glyphs in precisely two widths, one twice as
Expand All @@ -88,6 +85,8 @@ widths.
@DESC@
Constructs a pattern representing the 'id'th font in 'file'. The number
of fonts in 'file' is returned in 'count'.
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
accepted only for compatibility with older code.
@@

@SYNOPSIS@
Expand All @@ -103,4 +102,6 @@ of fonts in 'file' is returned in 'count'.
@DESC@
Constructs a pattern representing 'face'. 'file' and 'id' are used solely as
data for pattern elements (FC_FILE, FC_INDEX and sometimes FC_FAMILY).
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
accepted only for compatibility with older code.
@@
10 changes: 10 additions & 0 deletions doc/fontconfig-devel.sgml
Expand Up @@ -380,6 +380,11 @@ holds a list of Unicode chars which are expected to be blank; unexpectedly
blank chars are assumed to be invalid and are elided from the charset
associated with the font.
</para>
<para>
FcBlanks is deprecated and should not be used in newly written code.
It is still accepted by some functions for compatibility with
older code but will be removed in the future.
</para>
</sect2>
<sect2><title>FcFileCache</title>
<para>
Expand Down Expand Up @@ -558,6 +563,11 @@ empty and not in this list will be assumed to be broken and not placed in
the FcCharSet associated with the font. This provides a significantly more
accurate CharSet for applications.
</para>
<para>
FcBlanks is deprecated and should not be used in newly written code.
It is still accepted by some functions for compatibility with
older code but will be removed in the future.
</para>
&fcblanks;
</sect2>
<sect2><title>FcAtomic</title>
Expand Down
46 changes: 0 additions & 46 deletions fc-blanks/Makefile.am

This file was deleted.

160 changes: 0 additions & 160 deletions fc-blanks/fc-blanks.py

This file was deleted.

25 changes: 0 additions & 25 deletions fc-blanks/fcblanks.tmpl.h

This file was deleted.

0 comments on commit c524522

Please sign in to comment.