mirror of https://github.com/freetype/freetype
Various minor documentation or formatting fixes.
This commit is contained in:
parent
ec378cecaf
commit
ed8b82ba94
|
@ -847,7 +847,7 @@ FT_BEGIN_HEADER
|
||||||
* FT_Property_Set( library, "sdf", "spread", &spread );
|
* FT_Property_Set( library, "sdf", "spread", &spread );
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @note
|
* @note:
|
||||||
* FreeType has two rasterizers for generating SDF, namely:
|
* FreeType has two rasterizers for generating SDF, namely:
|
||||||
*
|
*
|
||||||
* 1. `sdf` for generating SDF directly from glyph's outline, and
|
* 1. `sdf` for generating SDF directly from glyph's outline, and
|
||||||
|
|
|
@ -21,9 +21,10 @@
|
||||||
* Note: A 'raster' is simply a scan-line converter, used to render
|
* Note: A 'raster' is simply a scan-line converter, used to render
|
||||||
* `FT_Outline`s into `FT_Bitmap`s.
|
* `FT_Outline`s into `FT_Bitmap`s.
|
||||||
*
|
*
|
||||||
* Note: This file can be used for STANDALONE_ compilation of raster (B/W)
|
* Note: This file can be used for `STANDALONE_` compilation of raster
|
||||||
* and smooth (anti-aliased) renderers. Therefore, it must rely on
|
* (B/W) and smooth (anti-aliased) renderers. Therefore, it must
|
||||||
* standard variable types only rather than aliases in fttypes.h.
|
* rely on standard variable types only instead of aliases in
|
||||||
|
* `fttypes.h`.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -511,8 +511,8 @@ FT_BEGIN_HEADER
|
||||||
* The result of 'sqrt(x)'.
|
* The result of 'sqrt(x)'.
|
||||||
*
|
*
|
||||||
* @note:
|
* @note:
|
||||||
* This function is slow and should be avoided. Consider `FT_Hypot` or
|
* This function is slow and should be avoided. Consider @FT_Hypot or
|
||||||
* `FT_Vector_NormLen' instead.
|
* @FT_Vector_NormLen instead.
|
||||||
*/
|
*/
|
||||||
FT_BASE( FT_UInt32 )
|
FT_BASE( FT_UInt32 )
|
||||||
FT_SqrtFixed( FT_UInt32 x );
|
FT_SqrtFixed( FT_UInt32 x );
|
||||||
|
|
34
meson.build
34
meson.build
|
@ -231,7 +231,7 @@ endif
|
||||||
# value from the environment, when this is supported. A smaller refactor
|
# value from the environment, when this is supported. A smaller refactor
|
||||||
# might make these platform-specific files much smaller, and could be moved
|
# might make these platform-specific files much smaller, and could be moved
|
||||||
# into `ftsystem.c` as well.
|
# into `ftsystem.c` as well.
|
||||||
#
|
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
winmod = import('windows')
|
winmod = import('windows')
|
||||||
ft2_sources += [
|
ft2_sources += [
|
||||||
|
@ -251,7 +251,7 @@ common_ldflags = []
|
||||||
#
|
#
|
||||||
# OSX sets the compatibility_version (aka libtools version) differently from
|
# OSX sets the compatibility_version (aka libtools version) differently from
|
||||||
# the library name.
|
# the library name.
|
||||||
#
|
|
||||||
if host_machine.system() == 'darwin'
|
if host_machine.system() == 'darwin'
|
||||||
# maintain compatibility with autotools on macOS
|
# maintain compatibility with autotools on macOS
|
||||||
common_ldflags = [
|
common_ldflags = [
|
||||||
|
@ -266,13 +266,13 @@ endif
|
||||||
process_header_command = [python_exe,
|
process_header_command = [python_exe,
|
||||||
files('builds/meson/process_ftoption_h.py'),
|
files('builds/meson/process_ftoption_h.py'),
|
||||||
'@INPUT@', '--output=@OUTPUT@']
|
'@INPUT@', '--output=@OUTPUT@']
|
||||||
|
|
||||||
ftoption_command = process_header_command
|
ftoption_command = process_header_command
|
||||||
|
|
||||||
|
# External GZip support.
|
||||||
# external GZip support
|
|
||||||
zlib_option = get_option('zlib')
|
zlib_option = get_option('zlib')
|
||||||
|
|
||||||
# Backwards-compatible aliases.
|
# Backward-compatible aliases.
|
||||||
if zlib_option == 'disabled'
|
if zlib_option == 'disabled'
|
||||||
zlib_option = 'none'
|
zlib_option = 'none'
|
||||||
elif zlib_option == 'enabled'
|
elif zlib_option == 'enabled'
|
||||||
|
@ -315,10 +315,12 @@ else
|
||||||
assert(false, 'Invalid zlib option ' + zlib_option)
|
assert(false, 'Invalid zlib option ' + zlib_option)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# BZip2 support
|
# BZip2 support.
|
||||||
bzip2_dep = dependency('bzip2', required: false)
|
bzip2_dep = dependency('bzip2', required: false)
|
||||||
if not bzip2_dep.found()
|
if not bzip2_dep.found()
|
||||||
bzip2_dep = cc.find_library('bz2', has_headers: ['bzlib.h'], required: get_option('bzip2'))
|
bzip2_dep = cc.find_library('bz2',
|
||||||
|
has_headers: ['bzlib.h'],
|
||||||
|
required: get_option('bzip2'))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if bzip2_dep.found()
|
if bzip2_dep.found()
|
||||||
|
@ -327,7 +329,7 @@ if bzip2_dep.found()
|
||||||
ft2_deps += [bzip2_dep]
|
ft2_deps += [bzip2_dep]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# PNG support
|
# PNG support.
|
||||||
libpng_dep = dependency('libpng',
|
libpng_dep = dependency('libpng',
|
||||||
required: get_option('png'),
|
required: get_option('png'),
|
||||||
fallback: 'libpng')
|
fallback: 'libpng')
|
||||||
|
@ -337,7 +339,7 @@ if libpng_dep.found()
|
||||||
ft2_deps += [libpng_dep]
|
ft2_deps += [libpng_dep]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Harfbuzz support
|
# Harfbuzz support.
|
||||||
harfbuzz_dep = dependency('harfbuzz',
|
harfbuzz_dep = dependency('harfbuzz',
|
||||||
version: '>= 2.0.0',
|
version: '>= 2.0.0',
|
||||||
required: get_option('harfbuzz'),
|
required: get_option('harfbuzz'),
|
||||||
|
@ -348,7 +350,7 @@ if harfbuzz_dep.found()
|
||||||
ft2_deps += [harfbuzz_dep]
|
ft2_deps += [harfbuzz_dep]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Brotli decompression support
|
# Brotli decompression support.
|
||||||
brotli_dep = dependency('libbrotlidec',
|
brotli_dep = dependency('libbrotlidec',
|
||||||
required: get_option('brotli'))
|
required: get_option('brotli'))
|
||||||
|
|
||||||
|
@ -376,6 +378,7 @@ endif
|
||||||
# Generate `ftconfig.h`.
|
# Generate `ftconfig.h`.
|
||||||
|
|
||||||
ftconfig_command = process_header_command
|
ftconfig_command = process_header_command
|
||||||
|
|
||||||
if has_unistd_h
|
if has_unistd_h
|
||||||
ftconfig_command += '--enable=HAVE_UNISTD_H'
|
ftconfig_command += '--enable=HAVE_UNISTD_H'
|
||||||
endif
|
endif
|
||||||
|
@ -409,7 +412,8 @@ ft2_lib = library('freetype',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# To be used by other projects including this one through `subproject`.
|
# To be used by other projects including this one via `subproject`.
|
||||||
|
|
||||||
freetype_dep = declare_dependency(
|
freetype_dep = declare_dependency(
|
||||||
include_directories: ft2_includes,
|
include_directories: ft2_includes,
|
||||||
link_with: ft2_lib,
|
link_with: ft2_lib,
|
||||||
|
@ -418,9 +422,9 @@ freetype_dep = declare_dependency(
|
||||||
meson.override_dependency('freetype2', freetype_dep)
|
meson.override_dependency('freetype2', freetype_dep)
|
||||||
|
|
||||||
|
|
||||||
# NOTE: Using both `install_dir` and `subdir` doesn't seem to work below,
|
# NOTE: Using both `install_dir` and `subdir` doesn't seem to work
|
||||||
# i.e., the subdir value seems to be ignored, contrary to examples in the
|
# below, i.e., the `subdir` value seems to be ignored, contrary to
|
||||||
# Meson documentation.
|
# examples in the Meson documentation.
|
||||||
install_headers('include/ft2build.h',
|
install_headers('include/ft2build.h',
|
||||||
install_dir: freetype_includedir)
|
install_dir: freetype_includedir)
|
||||||
install_headers(ft2_public_headers,
|
install_headers(ft2_public_headers,
|
||||||
|
@ -444,9 +448,11 @@ if get_option('tests').enabled()
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# NOTE: Unlike the old `make refdoc` command, this generates the
|
# NOTE: Unlike the old `make refdoc` command, this generates the
|
||||||
# documentation under `$BUILD/docs/` since Meson doesn't support modifying
|
# documentation under `$BUILD/docs/` since Meson doesn't support modifying
|
||||||
# the source root directory (which is a good thing).
|
# the source root directory (which is a good thing).
|
||||||
|
|
||||||
gen_docs = custom_target('freetype2 reference documentation',
|
gen_docs = custom_target('freetype2 reference documentation',
|
||||||
output: 'docs',
|
output: 'docs',
|
||||||
input: ft2_public_headers + ft2_config_headers,
|
input: ft2_public_headers + ft2_config_headers,
|
||||||
|
|
|
@ -897,11 +897,11 @@
|
||||||
|
|
||||||
#ifndef FT_INT64
|
#ifndef FT_INT64
|
||||||
|
|
||||||
/* Algorithm by Christophe Meessen (1993) with overflow fixed and */
|
/* Algorithm by Christophe Meessen (1993) with overflow fixed and */
|
||||||
/* rounding added. Any unsigned fixed 16.16 argument is acceptable. */
|
/* rounding added. Any unsigned fixed 16.16 argument is acceptable. */
|
||||||
/* However, this algorithm is slower than the Babylonian method with */
|
/* However, this algorithm is slower than the Babylonian method with */
|
||||||
/* a good initial guess. We only use it for large 32-bit values when */
|
/* a good initial guess. We only use it for large 32-bit values when */
|
||||||
/* 64-bit computations are not desirable. */
|
/* 64-bit computations are not desirable. */
|
||||||
else if ( v > 0x10000U )
|
else if ( v > 0x10000U )
|
||||||
{
|
{
|
||||||
FT_UInt32 r = v >> 1;
|
FT_UInt32 r = v >> 1;
|
||||||
|
@ -920,8 +920,8 @@
|
||||||
}
|
}
|
||||||
r <<= 1;
|
r <<= 1;
|
||||||
b >>= 1;
|
b >>= 1;
|
||||||
}
|
|
||||||
while ( b > 0x10 ); /* exactly 25 cycles */
|
} while ( b > 0x10 ); /* exactly 25 cycles */
|
||||||
|
|
||||||
return ( q + 0x40 ) >> 7;
|
return ( q + 0x40 ) >> 7;
|
||||||
}
|
}
|
||||||
|
@ -946,8 +946,8 @@
|
||||||
{
|
{
|
||||||
t = q;
|
t = q;
|
||||||
q = ( t + (FT_UInt32)( r / t ) + 1 ) >> 1;
|
q = ( t + (FT_UInt32)( r / t ) + 1 ) >> 1;
|
||||||
}
|
|
||||||
while ( q != t ); /* less than 6 cycles */
|
} while ( q != t ); /* less than 6 cycles */
|
||||||
|
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@
|
||||||
FT_UInt len = *p;
|
FT_UInt len = *p;
|
||||||
|
|
||||||
|
|
||||||
/* all names in Adobe Glyph List are shorter than 40 characters */
|
/* names in the Adobe Glyph List are shorter than 40 characters */
|
||||||
if ( len >= 40U )
|
if ( len >= 40U )
|
||||||
FT_TRACE4(( "load_format_20: unusual %u-char name found\n", len ));
|
FT_TRACE4(( "load_format_20: unusual %u-char name found\n", len ));
|
||||||
|
|
||||||
|
|
|
@ -2115,7 +2115,7 @@
|
||||||
/* Convert delta in F2DOT14 to 16.16 before adding. */
|
/* Convert delta in F2DOT14 to 16.16 before adding. */
|
||||||
v += MUL_INT( delta, 4 );
|
v += MUL_INT( delta, 4 );
|
||||||
|
|
||||||
/* Clamp value range [-1, 1]. */
|
/* Clamp value to range [-1, 1]. */
|
||||||
v = v >= 0x10000L ? 0x10000 : v;
|
v = v >= 0x10000L ? 0x10000 : v;
|
||||||
v = v <= -0x10000L ? -0x10000 : v;
|
v = v <= -0x10000L ? -0x10000 : v;
|
||||||
|
|
||||||
|
@ -3770,8 +3770,8 @@
|
||||||
for ( i = 0; i < face->cvt_size; i++ )
|
for ( i = 0; i < face->cvt_size; i++ )
|
||||||
face->cvt[i] += FT_fixedToFdot6( cvt_deltas[i] );
|
face->cvt[i] += FT_fixedToFdot6( cvt_deltas[i] );
|
||||||
|
|
||||||
/* iterate over all FT_Size objects and set `cvt_ready' to -1 */
|
/* Iterate over all `FT_Size` objects and set `cvt_ready` to -1 */
|
||||||
/* to trigger rescaling of all CVT values */
|
/* to trigger rescaling of all CVT values. */
|
||||||
FT_List_Iterate( &root->sizes_list,
|
FT_List_Iterate( &root->sizes_list,
|
||||||
tt_cvt_ready_iterator,
|
tt_cvt_ready_iterator,
|
||||||
NULL );
|
NULL );
|
||||||
|
|
Loading…
Reference in New Issue