Skip to content

Commit 56abd69

Browse files
committed
HACK: Suppress the offending functions
1 parent e2719a1 commit 56abd69

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/DearImGui/Raw/Font.hs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ addFontFromFileTTF :: MonadIO m
8585
addFontFromFileTTF filenamePtr sizePixels (FontConfig fontConfig) (GlyphRanges glyphRanges) = liftIO do
8686
Font <$> [C.block|
8787
ImFont* {
88-
return GetIO().Fonts->AddFontFromFileTTF(
89-
$(char* filenamePtr),
90-
$(float sizePixels),
91-
$(ImFontConfig* fontConfig),
92-
$(ImWchar* glyphRanges));
88+
return GetIO().Fonts->AddFontDefault(NULL);
9389
}
9490
|]
9591

@@ -98,13 +94,7 @@ addFontFromMemoryTTF :: MonadIO m => CStringLen -> CFloat -> FontConfig -> Glyph
9894
addFontFromMemoryTTF (castPtr -> fontDataPtr, fromIntegral -> fontSize) sizePixels (FontConfig fontConfig) (GlyphRanges glyphRanges) = liftIO do
9995
Font <$> [C.block|
10096
ImFont* {
101-
return GetIO().Fonts->AddFontFromMemoryTTF(
102-
$(void* fontDataPtr),
103-
$(int fontSize),
104-
$(float sizePixels),
105-
$(ImFontConfig* fontConfig),
106-
$(ImWchar* glyphRanges)
107-
);
97+
return GetIO().Fonts->AddFontDefault(NULL);
10898
}
10999
|]
110100

src/DearImGui/Raw/Font/GlyphRanges.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ addRanges :: MonadIO m => GlyphRangesBuilder -> GlyphRanges -> m()
255255
addRanges (GlyphRangesBuilder builder) (GlyphRanges ranges) = liftIO do
256256
[C.block|
257257
void {
258-
$(ImFontGlyphRangesBuilder* builder)->AddRanges($(ImWchar* ranges));
258+
return;
259259
}
260260
|]
261261

@@ -267,7 +267,6 @@ buildRangesVector (GlyphRangesBuilder builder) = liftIO do
267267
GlyphRangesVector <$> [C.block|
268268
void* {
269269
ImVector<ImWchar>* ranges = IM_NEW(ImVector<ImWchar>);
270-
$(ImFontGlyphRangesBuilder* builder)->BuildRanges(ranges);
271270
return ranges;
272271
}
273272
|]

0 commit comments

Comments
 (0)