[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master ed8b82ba9 1/5: Various minor documentation or formatt
From: |
Werner Lemberg |
Subject: |
[freetype2] master ed8b82ba9 1/5: Various minor documentation or formatting fixes. |
Date: |
Mon, 12 Aug 2024 07:54:51 -0400 (EDT) |
branch: master
commit ed8b82ba9499a0dd460f5a0f110e5e3f9054e2ac
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>
Various minor documentation or formatting fixes.
---
include/freetype/ftdriver.h | 2 +-
include/freetype/ftimage.h | 7 ++++---
include/freetype/internal/ftcalc.h | 4 ++--
meson.build | 34 ++++++++++++++++++++--------------
src/base/ftcalc.c | 18 +++++++++---------
src/sfnt/ttpost.c | 2 +-
src/truetype/ttgxvar.c | 6 +++---
7 files changed, 40 insertions(+), 33 deletions(-)
diff --git a/include/freetype/ftdriver.h b/include/freetype/ftdriver.h
index dd31626b0..1b7f539f5 100644
--- a/include/freetype/ftdriver.h
+++ b/include/freetype/ftdriver.h
@@ -847,7 +847,7 @@ FT_BEGIN_HEADER
* FT_Property_Set( library, "sdf", "spread", &spread );
* ```
*
- * @note
+ * @note:
* FreeType has two rasterizers for generating SDF, namely:
*
* 1. `sdf` for generating SDF directly from glyph's outline, and
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index 6c7085f61..2b4b4ac60 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -21,9 +21,10 @@
* Note: A 'raster' is simply a scan-line converter, used to render
* `FT_Outline`s into `FT_Bitmap`s.
*
- * Note: This file can be used for STANDALONE_ compilation of raster (B/W)
- * and smooth (anti-aliased) renderers. Therefore, it must rely on
- * standard variable types only rather than aliases in fttypes.h.
+ * Note: This file can be used for `STANDALONE_` compilation of raster
+ * (B/W) and smooth (anti-aliased) renderers. Therefore, it must
+ * rely on standard variable types only instead of aliases in
+ * `fttypes.h`.
*
*/
diff --git a/include/freetype/internal/ftcalc.h
b/include/freetype/internal/ftcalc.h
index aba9b69a8..71128a2df 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -511,8 +511,8 @@ FT_BEGIN_HEADER
* The result of 'sqrt(x)'.
*
* @note:
- * This function is slow and should be avoided. Consider `FT_Hypot` or
- * `FT_Vector_NormLen' instead.
+ * This function is slow and should be avoided. Consider @FT_Hypot or
+ * @FT_Vector_NormLen instead.
*/
FT_BASE( FT_UInt32 )
FT_SqrtFixed( FT_UInt32 x );
diff --git a/meson.build b/meson.build
index 18d812499..12a319fec 100644
--- a/meson.build
+++ b/meson.build
@@ -231,7 +231,7 @@ endif
# value from the environment, when this is supported. A smaller refactor
# might make these platform-specific files much smaller, and could be moved
# into `ftsystem.c` as well.
-#
+
if host_machine.system() == 'windows'
winmod = import('windows')
ft2_sources += [
@@ -251,7 +251,7 @@ common_ldflags = []
#
# OSX sets the compatibility_version (aka libtools version) differently from
# the library name.
-#
+
if host_machine.system() == 'darwin'
# maintain compatibility with autotools on macOS
common_ldflags = [
@@ -266,13 +266,13 @@ endif
process_header_command = [python_exe,
files('builds/meson/process_ftoption_h.py'),
'@INPUT@', '--output=@OUTPUT@']
-ftoption_command = process_header_command
+ftoption_command = process_header_command
-# external GZip support
+# External GZip support.
zlib_option = get_option('zlib')
-# Backwards-compatible aliases.
+# Backward-compatible aliases.
if zlib_option == 'disabled'
zlib_option = 'none'
elif zlib_option == 'enabled'
@@ -315,10 +315,12 @@ else
assert(false, 'Invalid zlib option ' + zlib_option)
endif
-# BZip2 support
+# BZip2 support.
bzip2_dep = dependency('bzip2', required: false)
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
if bzip2_dep.found()
@@ -327,7 +329,7 @@ if bzip2_dep.found()
ft2_deps += [bzip2_dep]
endif
-# PNG support
+# PNG support.
libpng_dep = dependency('libpng',
required: get_option('png'),
fallback: 'libpng')
@@ -337,7 +339,7 @@ if libpng_dep.found()
ft2_deps += [libpng_dep]
endif
-# Harfbuzz support
+# Harfbuzz support.
harfbuzz_dep = dependency('harfbuzz',
version: '>= 2.0.0',
required: get_option('harfbuzz'),
@@ -348,7 +350,7 @@ if harfbuzz_dep.found()
ft2_deps += [harfbuzz_dep]
endif
-# Brotli decompression support
+# Brotli decompression support.
brotli_dep = dependency('libbrotlidec',
required: get_option('brotli'))
@@ -376,6 +378,7 @@ endif
# Generate `ftconfig.h`.
ftconfig_command = process_header_command
+
if has_unistd_h
ftconfig_command += '--enable=HAVE_UNISTD_H'
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(
include_directories: ft2_includes,
link_with: ft2_lib,
@@ -418,9 +422,9 @@ freetype_dep = declare_dependency(
meson.override_dependency('freetype2', freetype_dep)
-# NOTE: Using both `install_dir` and `subdir` doesn't seem to work below,
-# i.e., the subdir value seems to be ignored, contrary to examples in the
-# Meson documentation.
+# NOTE: Using both `install_dir` and `subdir` doesn't seem to work
+# below, i.e., the `subdir` value seems to be ignored, contrary to
+# examples in the Meson documentation.
install_headers('include/ft2build.h',
install_dir: freetype_includedir)
install_headers(ft2_public_headers,
@@ -444,9 +448,11 @@ if get_option('tests').enabled()
subdir('tests')
endif
+
# NOTE: Unlike the old `make refdoc` command, this generates the
# documentation under `$BUILD/docs/` since Meson doesn't support modifying
# the source root directory (which is a good thing).
+
gen_docs = custom_target('freetype2 reference documentation',
output: 'docs',
input: ft2_public_headers + ft2_config_headers,
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 5851dae16..92de09ed8 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -897,11 +897,11 @@
#ifndef FT_INT64
- /* Algorithm by Christophe Meessen (1993) with overflow fixed and */
- /* rounding added. Any unsigned fixed 16.16 argument is acceptable. */
- /* However, this algorithm is slower than the Babylonian method with */
- /* a good initial guess. We only use it for large 32-bit values when */
- /* 64-bit computations are not desirable. */
+ /* Algorithm by Christophe Meessen (1993) with overflow fixed and */
+ /* rounding added. Any unsigned fixed 16.16 argument is acceptable. */
+ /* However, this algorithm is slower than the Babylonian method with */
+ /* a good initial guess. We only use it for large 32-bit values when */
+ /* 64-bit computations are not desirable. */
else if ( v > 0x10000U )
{
FT_UInt32 r = v >> 1;
@@ -920,8 +920,8 @@
}
r <<= 1;
b >>= 1;
- }
- while ( b > 0x10 ); /* exactly 25 cycles */
+
+ } while ( b > 0x10 ); /* exactly 25 cycles */
return ( q + 0x40 ) >> 7;
}
@@ -946,8 +946,8 @@
{
t = q;
q = ( t + (FT_UInt32)( r / t ) + 1 ) >> 1;
- }
- while ( q != t ); /* less than 6 cycles */
+
+ } while ( q != t ); /* less than 6 cycles */
return q;
}
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index a90237ad0..dd798d2b2 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -226,7 +226,7 @@
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 )
FT_TRACE4(( "load_format_20: unusual %u-char name found\n", len ));
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 396c38381..4f0083c96 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -2115,7 +2115,7 @@
/* Convert delta in F2DOT14 to 16.16 before adding. */
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;
@@ -3770,8 +3770,8 @@
for ( i = 0; i < face->cvt_size; i++ )
face->cvt[i] += FT_fixedToFdot6( cvt_deltas[i] );
- /* iterate over all FT_Size objects and set `cvt_ready' to -1 */
- /* to trigger rescaling of all CVT values */
+ /* Iterate over all `FT_Size` objects and set `cvt_ready` to -1 */
+ /* to trigger rescaling of all CVT values. */
FT_List_Iterate( &root->sizes_list,
tt_cvt_ready_iterator,
NULL );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master ed8b82ba9 1/5: Various minor documentation or formatting fixes.,
Werner Lemberg <=