Skip to content

Commit 059e30d

Browse files
committed
PangoFontInfo: Remove unused method is_fraktur
That restores commit 25e0c1a and partially revert commit 4907a23 which added the now unused Shlwapi library. Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent f4f66f8 commit 059e30d

File tree

4 files changed

+0
-25
lines changed

4 files changed

+0
-25
lines changed

cppan.yml

-6
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,6 @@ projects:
224224
dependencies:
225225
- common_training
226226
- pvt.cppan.demo.unicode.icu.i18n
227-
options:
228-
any:
229-
link_libraries:
230-
win32:
231-
private:
232-
- Shlwapi
233227

234228
lstmeval:
235229
files: training/lstmeval.cpp

training/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ target_link_libraries (unicharset_training common_training ${ICU_LIBRARIES
196196
else()
197197
target_link_libraries (unicharset_training common_training pvt.cppan.demo.unicode.icu.i18n)
198198
endif()
199-
if (WIN32)
200-
target_link_libraries (unicharset_training Shlwapi)
201-
endif()
202199
project_group (unicharset_training "Training Tools")
203200

204201

training/pango_font_info.cpp

-14
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,6 @@
4646
#include "pango/pangocairo.h"
4747
#include "pango/pangofc-font.h"
4848

49-
#ifdef _MSC_VER
50-
#ifndef strcasecmp
51-
#define strcasecmp stricmp
52-
#endif
53-
#include <Shlwapi.h>
54-
#ifndef strcasestr
55-
#define strcasestr StrStrIA
56-
#endif
57-
#endif
58-
5949
STRING_PARAM_FLAG(fontconfig_tmpdir, "/tmp",
6050
"Overrides fontconfig default temporary dir");
6151

@@ -232,10 +222,6 @@ bool PangoFontInfo::ParseFontDescription(const PangoFontDescription *desc) {
232222
== PANGO_VARIANT_SMALL_CAPS);
233223

234224
is_bold_ = (pango_font_description_get_weight(desc) >= PANGO_WEIGHT_BOLD);
235-
// We don't have a way to detect whether a font is of type Fraktur. The fonts
236-
// we currently use all have "Fraktur" in their family name, so we do a
237-
// fragile but functional check for that here.
238-
is_fraktur_ = (strcasestr(family, "Fraktur") != nullptr);
239225
return true;
240226
}
241227

training/pango_font_info.h

-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ class PangoFontInfo {
109109
bool is_italic() const { return is_italic_; }
110110
bool is_smallcaps() const { return is_smallcaps_; }
111111
bool is_monospace() const { return is_monospace_; }
112-
bool is_fraktur() const { return is_fraktur_; }
113112
FontTypeEnum font_type() const { return font_type_; }
114113

115114
int resolution() const { return resolution_; }
@@ -132,7 +131,6 @@ class PangoFontInfo {
132131
bool is_italic_;
133132
bool is_smallcaps_;
134133
bool is_monospace_;
135-
bool is_fraktur_;
136134
FontTypeEnum font_type_;
137135
// The Pango description that was used to initialize the instance.
138136
PangoFontDescription* desc_;

0 commit comments

Comments
 (0)