From 3901df6ee1f24980e77f037c0ff09a4eb46c6164 Mon Sep 17 00:00:00 2001 From: squid233 <60126026+squid233@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:41:07 +0800 Subject: [PATCH] [STB] Fix javadoc --- .../main/java/overrungl/stb/STBTrueType.java | 26 +++++++++---------- .../main/java/overrungl/stb/STBVorbis.java | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java index deaf37ae..5acb8b25 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTrueType.java @@ -133,7 +133,7 @@ * That's because getting it out of the .ttf file is really hard, because * the names in the file can appear in many possible encodings, in many * possible languages, and e.g. if you need a case-insensitive comparison, - * the details of that depend on the encoding & language in a complex way + * the details of that depend on the encoding & language in a complex way * (actually underspecified in truetype, but also gigantic). *

* But you can use the provided functions in two possible ways: @@ -418,7 +418,7 @@ int bakeFontBitmap(@NativeType("const unsigned char *") MemorySegment data, int * Characters will extend both above and below the current position; * see discussion of "BASELINE" above. *

- * It's inefficient; you might want to c&p it and optimize it. + * It's inefficient; you might want to c&p it and optimize it. * * @param chardata same data as {@link #bakeFontBitmap(MemorySegment, int, float, MemorySegment, int, int, int, int, STBTTBakedChar) above} * @param pw same data as above @@ -879,7 +879,7 @@ void getPackedQuad(STBTTPackedChar chardata, int pw, int ph, * Retrieves a complete list of all of the kerning pairs provided by the font * stbtt_GetKerningTable never writes more than table_length entries and returns how many entries it did write. *

- * The table will be sorted by (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1) + * The table will be sorted by {@code (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1)} * * @param info info * @return how many entries it did write @@ -891,7 +891,7 @@ void getPackedQuad(STBTTPackedChar chardata, int pw, int ph, * Retrieves a complete list of all of the kerning pairs provided by the font * stbtt_GetKerningTable never writes more than table_length entries and returns how many entries it did write. *

- * The table will be sorted by (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1) + * The table will be sorted by {@code (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1)} * * @param info info * @param table table @@ -1013,7 +1013,7 @@ void getPackedQuad(STBTTPackedChar chardata, int pw, int ph, * allocates a large-enough single-channel 8bpp bitmap and renders the * specified character/glyph at the specified scale into it, with * antialiasing. 0 is no coverage (transparent), 255 is fully covered (opaque). - * *width & *height are filled out with the width & height of the bitmap, + * *width & *height are filled out with the width & height of the bitmap, * which is stored left-to-right, top-to-bottom. * * @param info info @@ -1319,7 +1319,7 @@ void rasterize(@NativeType("stbtt__bitmap *") MemorySegment result, * in a single-channel texture, sampling with bilinear filtering, and testing against * larger than some threshold to produce scalable fonts. *

- * pixel_dist_scale & onedge_value are a scale & bias that allows you to make + * pixel_dist_scale & onedge_value are a scale & bias that allows you to make * optimal use of the limited 0..255 for your application, trading off precision * and special effects. SDF values outside the range 0..255 are clamped to 0..255. *

Example

@@ -1333,7 +1333,7 @@ void rasterize(@NativeType("stbtt__bitmap *") MemorySegment result, * shape, sample the SDF at each pixel and fill the pixel if the SDF value * is greater than or equal to 180/255. (You'll actually want to antialias, * which is beyond the scope of this example.) Additionally, you can compute - * offset outlines (e.g. to stroke the character border inside & outside, + * offset outlines (e.g. to stroke the character border inside & outside, * or only outside). For example, to fill outside the character up to 3 SDF * pixels, you would compare against (180-36.0*3)/255 = 72/255. The above * choice of variables maps a range from 5 pixels outside the shape to @@ -1343,7 +1343,7 @@ void rasterize(@NativeType("stbtt__bitmap *") MemorySegment result, *

* The function computes the SDF analytically at each SDF pixel, not by e.g. * building a higher-res bitmap and approximating it. In theory the quality - * should be as high as possible for an SDF of this size & representation, but + * should be as high as possible for an SDF of this size & representation, but * unclear if this is true in practice (perhaps building a higher-res bitmap * and computing from that can allow drop-out prevention). *

@@ -1357,7 +1357,7 @@ void rasterize(@NativeType("stbtt__bitmap *") MemorySegment result, * which allows effects like bit outlines * @param onedge_value value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character) * @param pixel_dist_scale what value the SDF should increase by when moving one SDF "pixel" away from the edge (on the 0..255 scale) - * if positive, > onedge_value is inside; if negative, < onedge_value is inside + * if positive, {@code > onedge_value} is inside; if negative, {@code < onedge_value} is inside * @param width output width of the SDF bitmap (including padding) * @param height output height of the SDF bitmap (including padding) * @param xoff output origin of the character @@ -1373,7 +1373,7 @@ void rasterize(@NativeType("stbtt__bitmap *") MemorySegment result, * in a single-channel texture, sampling with bilinear filtering, and testing against * larger than some threshold to produce scalable fonts. *

- * pixel_dist_scale & onedge_value are a scale & bias that allows you to make + * pixel_dist_scale & onedge_value are a scale & bias that allows you to make * optimal use of the limited 0..255 for your application, trading off precision * and special effects. SDF values outside the range 0..255 are clamped to 0..255. *

Example

@@ -1387,7 +1387,7 @@ void rasterize(@NativeType("stbtt__bitmap *") MemorySegment result, * shape, sample the SDF at each pixel and fill the pixel if the SDF value * is greater than or equal to 180/255. (You'll actually want to antialias, * which is beyond the scope of this example.) Additionally, you can compute - * offset outlines (e.g. to stroke the character border inside & outside, + * offset outlines (e.g. to stroke the character border inside & outside, * or only outside). For example, to fill outside the character up to 3 SDF * pixels, you would compare against (180-36.0*3)/255 = 72/255. The above * choice of variables maps a range from 5 pixels outside the shape to @@ -1397,7 +1397,7 @@ void rasterize(@NativeType("stbtt__bitmap *") MemorySegment result, *

* The function computes the SDF analytically at each SDF pixel, not by e.g. * building a higher-res bitmap and approximating it. In theory the quality - * should be as high as possible for an SDF of this size & representation, but + * should be as high as possible for an SDF of this size & representation, but * unclear if this is true in practice (perhaps building a higher-res bitmap * and computing from that can allow drop-out prevention). *

@@ -1411,7 +1411,7 @@ void rasterize(@NativeType("stbtt__bitmap *") MemorySegment result, * which allows effects like bit outlines * @param onedge_value value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character) * @param pixel_dist_scale what value the SDF should increase by when moving one SDF "pixel" away from the edge (on the 0..255 scale) - * if positive, > onedge_value is inside; if negative, < onedge_value is inside + * if positive, {@code > onedge_value} is inside; if negative, {@code < onedge_value} is inside * @param width output width of the SDF bitmap (including padding) * @param height output height of the SDF bitmap (including padding) * @param xoff output origin of the character diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbis.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbis.java index 0b53835d..e03e46d2 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbis.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbis.java @@ -188,7 +188,7 @@ public interface STBVorbis { /** * create a vorbis decoder by passing in the initial data block containing - * the ogg&vorbis headers (you don't need to do parse them, just provide + * the ogg&vorbis headers (you don't need to do parse them, just provide * the first N bytes of the file--you're told if it's not enough, see below) * * @param datablock datablock