Nikolay Sivov : dwrite: Fix comment typos.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 18 11:09:03 CST 2016


Module: wine
Branch: master
Commit: d4438dae93ef9d9d1b7ed472c8636f5efcd0af81
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d4438dae93ef9d9d1b7ed472c8636f5efcd0af81

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Jan 17 21:41:56 2016 +0300

dwrite: Fix comment typos.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/analyzer.c | 10 +++++-----
 dlls/dwrite/font.c     |  7 ++++---
 dlls/dwrite/layout.c   | 11 ++++++-----
 dlls/dwrite/opentype.c |  2 +-
 4 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
index c054984..af034d1 100644
--- a/dlls/dwrite/analyzer.c
+++ b/dlls/dwrite/analyzer.c
@@ -34,7 +34,7 @@ extern const unsigned short wine_scripts_table[];
 struct dwritescript_properties {
     DWRITE_SCRIPT_PROPERTIES props;
     UINT32 scripttag;    /* OpenType script tag */
-    UINT32 scriptalttag; /* Version 2 tag, 0 is not defined */
+    UINT32 scriptalttag; /* Version 2 tag, 0 if not defined */
     BOOL is_complex;
     const struct scriptshaping_ops *ops;
 };
@@ -1273,15 +1273,15 @@ static inline UINT32 get_cluster_length(UINT16 const *clustermap, UINT32 start,
       If it's the case advance width is incremented up to minimum value.
 
       Important part is the direction in which this increment is applied;
-      it depends on from which directions total cluster advance was trimmed
+      it depends on direction from which total cluster advance was trimmed
       at step 1. So it could be incremented from leading, trailing, or both
       sides. When applied to both sides, each side gets half of difference
-      that bring advance to minimum width.
+      that brings advance to minimum width.
 
    3. Positive adjustments
 
-      After minimum width rule was applied, positive spacing is applied in same
-      way as negative ones on step 1.
+      After minimum width rule was applied, positive spacing is applied in the same
+      way as negative one on step 1.
 
    Glyph offset for leading glyph is adjusted too in a way that glyph origin
    keeps its position in coordinate system where initial advance width is counted
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 313c77e..fe0c1be 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -2737,7 +2737,7 @@ static BOOL font_apply_differentiation_rules(struct dwrite_font_data *font, WCHA
     /* for known weight values use appropriate names */
     else if (is_known_weight_value(font->weight, weightW)) {
     }
-    /* use Wnnn format as a fallback in case weight is not one of defined values */
+    /* use Wnnn format as a fallback in case weight is not one of known values */
     else {
         static const WCHAR fmtW[] = {'W','%','d',0};
         sprintfW(weightW, fmtW, font->weight);
@@ -3592,7 +3592,8 @@ static HRESULT WINAPI dwritefontfile_GetLoader(IDWriteFontFile *iface, IDWriteFo
     return S_OK;
 }
 
-static HRESULT WINAPI dwritefontfile_Analyze(IDWriteFontFile *iface, BOOL *isSupportedFontType, DWRITE_FONT_FILE_TYPE *fontFileType, DWRITE_FONT_FACE_TYPE *fontFaceType, UINT32 *numberOfFaces)
+static HRESULT WINAPI dwritefontfile_Analyze(IDWriteFontFile *iface, BOOL *isSupportedFontType, DWRITE_FONT_FILE_TYPE *fontFileType,
+    DWRITE_FONT_FACE_TYPE *fontFaceType, UINT32 *numberOfFaces)
 {
     struct dwrite_fontfile *This = impl_from_IDWriteFontFile(iface);
     IDWriteFontFileStream *stream;
@@ -3937,7 +3938,7 @@ static ULONG WINAPI localfontfileloader_Release(IDWriteLocalFontFileLoader *ifac
         struct local_cached_stream *stream, *stream2;
 
         /* This will detach all entries from cache. Entries are released together with streams,
-           so stream controls its lifetime. */
+           so stream controls cache entry lifetime. */
         LIST_FOR_EACH_ENTRY_SAFE(stream, stream2, &This->streams, struct local_cached_stream, entry)
             list_init(&stream->entry);
 
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 57c8ddc..f765dc6 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -999,9 +999,10 @@ static inline BOOL layout_is_erun_rtl(const struct layout_effective_run *erun)
     return erun->run->u.regular.run.bidiLevel & 1;
 }
 
-/* A set of parameters that additionally slits resulting runs. It happens after shaping and all text processing,
-   no glyph changes are possible. It's understandable for effects, because DrawGlyphRun() will report them,
-   but it also happens for decorations, so every effective run has uniform underline/strikethough/effect tuple. */
+/* A set of parameters that additionally splits resulting runs. It happens after shaping and all text processing,
+   no glyph changes are possible. It's understandable for drawing effects, because DrawGlyphRun() reports them as
+   one of the arguments, but it also happens for decorations, so every effective run has uniform
+   underline/strikethough/effect tuple. */
 struct layout_final_splitting_params {
     BOOL strikethrough;
     BOOL underline;
@@ -1141,7 +1142,7 @@ static HRESULT layout_add_effective_run(struct dwrite_textlayout *layout, const
     list_add_tail(&layout->eruns, &run->entry);
 
     /* Strikethrough style is guaranteed to be consistent within effective run,
-       it's width equals to run width, thikness and offset are derived from
+       its width equals to run width, thickness and offset are derived from
        font metrics, rest of the values are from layout or run itself */
     if (params->strikethrough) {
         struct layout_strikethrough *s;
@@ -2200,7 +2201,7 @@ static inline HRESULT return_range(const struct layout_range_header *h, DWRITE_T
     return S_OK;
 }
 
-/* Set attribute value for given range, does all needed splitting/merging of existing ranges. */
+/* Sets attribute value for given range, does all needed splitting/merging of existing ranges. */
 static HRESULT set_layout_range_attr(struct dwrite_textlayout *layout, enum layout_range_attr_kind attr, struct layout_range_attr_value *value)
 {
     struct layout_range_header *cur, *right, *left, *outer;
diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c
index b48a769..5898fb4 100644
--- a/dlls/dwrite/opentype.c
+++ b/dlls/dwrite/opentype.c
@@ -1302,7 +1302,7 @@ static HRESULT opentype_get_font_strings_from_id(const void *table_data, enum OP
     return exists ? S_OK : E_FAIL;
 }
 
-/* Provides a conversion from DWRITE to OpenType name ids, input id be valid, it's not checked. */
+/* Provides a conversion from DWRITE to OpenType name ids, input id should be valid, it's not checked. */
 HRESULT opentype_get_font_info_strings(const void *table_data, DWRITE_INFORMATIONAL_STRING_ID id, IDWriteLocalizedStrings **strings)
 {
     return opentype_get_font_strings_from_id(table_data, dwriteid_to_opentypeid[id], strings);




More information about the wine-cvs mailing list