Skip to content

Commit 4ab2db5

Browse files
authored
Enable FontConfig to improve font fallbacks (#40)
* Use LANG instead of LC_TIME to get default locale To make compatible with Tizen 4.0 * Enable FontConfig to improve font fallback * Copy icudtl.dat directly from third_party/icu For reduced size (878 KB, previously 11 MB)
1 parent ae2a1b1 commit 4ab2db5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

azure-pipelines.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
--target-sysroot `pwd`/tizen_tools/sysroot/$(arch) \
5454
--target-triple $(targetTriple) \
5555
--runtime-mode $(mode) \
56+
--enable-fontconfig \
5657
--embedder-for-target \
5758
--disable-desktop-embeddings \
5859
--build-tizen-shell \
@@ -69,6 +70,7 @@ jobs:
6970
--target-sysroot `pwd`/tizen_tools/sysroot/$(arch)_40 \
7071
--target-triple $(targetTriple) \
7172
--runtime-mode $(mode) \
73+
--enable-fontconfig \
7274
--embedder-for-target \
7375
--disable-desktop-embeddings \
7476
--build-tizen-shell \
@@ -83,9 +85,6 @@ jobs:
8385
cp default/out/linux_$(mode)_$(arch)/libflutter_tizen.so $OUTDIR
8486
cp tizen40/out/linux_$(mode)_$(arch)/libflutter_tizen.so $OUTDIR/libflutter_tizen40.so
8587
cp tizen40/out/linux_$(mode)_$(arch)/libflutter_engine.so $OUTDIR
86-
if [ "$(System.JobName)" = "tizen-arm-release" ]; then
87-
cp default/out/linux_$(mode)_$(arch)/icudtl.dat $OUTDIR
88-
fi
8988
displayName: Copy artifacts
9089
workingDirectory: $(buildroot)/output
9190
failOnStderr: true
@@ -115,12 +114,12 @@ jobs:
115114
cp -r $ROOT/common/cpp/client_wrapper/include common/client_wrapper
116115
cp $ROOT/tizen/public/*.h common/public
117116
cp $ROOT/tizen/LICENSE .
118-
displayName: Copy peripherals
117+
displayName: Copy headers
119118
workingDirectory: $(Build.BinariesDirectory)
120119
failOnStderr: true
121120
- bash: |
121+
cp $(Pipeline.Workspace)/src/third_party/icu/flutter/icudtl.dat common
122122
mv $(Pipeline.Workspace)/tizen-* .
123-
mv tizen-arm-release/icudtl.dat common
124123
for platform in linux windows darwin; do
125124
for mode in release profile; do
126125
curl -o tmp.zip https://storage.googleapis.com/flutter_infra/flutter/$(upstreamVersion)/android-arm-$mode/$platform-x64.zip 2> /dev/null

shell/platform/tizen/channels/localization_channel.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void LocalizationChannel::SendLocales() {
2525
FlutterLocale* flutter_locale = nullptr;
2626
std::vector<FlutterLocale*> flutter_locales;
2727

28-
int ret = i18n_ulocale_set_default(getenv("LC_TIME"));
28+
int ret = i18n_ulocale_set_default(getenv("LANG"));
2929
ret = i18n_ulocale_get_default(&defualt_locale);
3030
if (ret != I18N_ERROR_NONE) {
3131
FT_LOGE("i18n_ulocale_get_default() failed.");

0 commit comments

Comments
 (0)