Skip to content

Commit 1e27db0

Browse files
committed
Fix class names
1 parent 2e0e408 commit 1e27db0

File tree

5 files changed

+24
-29
lines changed

5 files changed

+24
-29
lines changed

spec/subset_spec.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("harfbuzzsubset basic usage", function()
2525
end)
2626

2727
it("creates a subset input object", function()
28-
local input = hb_subset.subset_input.new()
28+
local input = hb_subset.SubsetInput.new()
2929
assert.truthy(input)
3030
-- minimal test of methods existing
3131
assert.is_function(input.keep_everything)
@@ -37,7 +37,7 @@ describe("harfbuzzsubset basic usage", function()
3737
local wght = hb.Tag.new("wght")
3838
local wdth = hb.Tag.new("wdth")
3939

40-
local input = hb_subset.subset_input.new()
40+
local input = hb_subset.SubsetInput.new()
4141
input:pin_axis_location(face, wght, 100)
4242
input:pin_axis_location(face, wdth, 100)
4343
input:keep_everything()
@@ -56,7 +56,7 @@ describe("harfbuzzsubset basic usage", function()
5656
local wght = hb.Tag.new("wght")
5757
local wdth = hb.Tag.new("wdth")
5858

59-
local input = hb_subset.subset_input.new()
59+
local input = hb_subset.SubsetInput.new()
6060
input:pin_axis_location(face, wght, 100)
6161
input:pin_axis_location(face, wdth, 100)
6262
input:keep_everything()
@@ -78,7 +78,7 @@ describe("harfbuzzsubset basic usage", function()
7878

7979
local wght = hb.Tag.new("wght")
8080
local wdth = hb.Tag.new("wdth")
81-
local input = hb_subset.subset_input.new()
81+
local input = hb_subset.SubsetInput.new()
8282
input:pin_axis_location(face, wght, 100)
8383
input:pin_axis_location(face, wdth, 100)
8484
input:keep_everything()
@@ -94,14 +94,14 @@ describe("harfbuzzsubset basic usage", function()
9494
local wght = hb.Tag.new("wght")
9595
local wdth = hb.Tag.new("wdth")
9696

97-
local input1 = hb_subset.subset_input.new()
97+
local input1 = hb_subset.SubsetInput.new()
9898
input1:pin_axis_location(face, wght, 100)
9999
input1:pin_axis_location(face, wdth, 100)
100100
input1:keep_everything()
101101
local face_light = hb_subset.subset(face, input1)
102102
local blob_light = face_light:blob():get_data()
103103

104-
local input2 = hb_subset.subset_input.new()
104+
local input2 = hb_subset.SubsetInput.new()
105105
input2:pin_axis_location(face, wght, 900)
106106
input2:pin_axis_location(face, wdth, 100)
107107
input2:keep_everything()
@@ -121,7 +121,7 @@ describe("harfbuzzsubset basic usage", function()
121121
local face = hb.Face.new(font_path)
122122
local orig_glyphs = face:get_glyph_count()
123123

124-
local input = hb_subset.subset_input.new()
124+
local input = hb_subset.SubsetInput.new()
125125

126126
local uset = input:unicode_set()
127127
uset:add(0x41) -- oder string.byte("A")

src/harfbuzz-subset.luadoc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-- local hb = require('harfbuzz')
1313
-- local hb_subset = require("harfbuzzsubset")
1414
--
15-
-- local input = hb_subset.subset.create()
15+
-- local input = hb_subset.SubsetInput.new()
1616
--
1717
-- local wght = hb.Tag.new("wght")
1818
-- local wdth = hb.Tag.new("wdth")
@@ -30,11 +30,6 @@
3030
-- fh:write(blob:get_data())
3131
-- fh:close()
3232
--
33-
-- The module returned by `require "harfbuzzsubset"` has two fields:
34-
--
35-
-- * `subset_input` — helpers and methods related to @{SubsetInput}
36-
-- * `subset` — helpers and methods related to @{SubsetInput}
37-
--
3833
-- @author Patrick Gundlach <<[email protected]>>
3934
-- @copyright 2025
4035
-- @license MIT

src/harfbuzz.luadoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,20 @@
431431
-- @field Language.INVALID
432432

433433

434+
--- Lua wrapper for `hb_set_t` type.
435+
--
436+
-- Set objects represent a mathematical set of integer values.
437+
--
438+
-- @type Set
439+
440+
--- Wraps `hb_set_add`.
441+
--
442+
-- Adds a codepoint to the set.
443+
--
444+
-- @param codepoint The element to add.
445+
-- @function Set:add
446+
447+
434448
--- Unicode functions.
435449
-- @section unicode-functions
436450

@@ -533,17 +547,3 @@
533547

534548
--- Wraps `HB_OT_LAYOUT_NO_VARIATIONS_INDEX`
535549
-- @field ot.LAYOUT_NO_VARIATIONS_INDEX
536-
537-
538-
--- Lua wrapper for `hb_set_t` type.
539-
--
540-
-- Set objects represent a mathematical set of integer values.
541-
--
542-
-- @type Set
543-
544-
--- Wraps `hb_set_add`.
545-
--
546-
-- Adds a codepoint to the set.
547-
--
548-
-- @param codepoint The element to add.
549-
-- @function Set:add

src/luaharfbuzz/luaharfbuzz.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int luaopen_luaharfbuzz (lua_State *L) {
9999
lua_setfield(L, -2, "unicode");
100100

101101
register_set(L);
102-
lua_setfield(L, -2, "set");
102+
lua_setfield(L, -2, "Set");
103103

104104
luaL_setfuncs(L, lib_table, 0);
105105

src/luaharfbuzzsubset/luaharfbuzzsubset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int luaopen_luaharfbuzzsubset (lua_State *L) {
3434
lua_newtable(L);
3535

3636
register_subset_input(L);
37-
lua_setfield(L, -2, "subset_input");
37+
lua_setfield(L, -2, "SubsetInput");
3838

3939
luaL_setfuncs(L, lib_table, 0);
4040

0 commit comments

Comments
 (0)