Skip to content

Commit

Permalink
Enable FontConfig to improve font fallbacks (#40)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
swift-kim authored Feb 10, 2021
1 parent ae2a1b1 commit 4ab2db5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
--target-sysroot `pwd`/tizen_tools/sysroot/$(arch) \
--target-triple $(targetTriple) \
--runtime-mode $(mode) \
--enable-fontconfig \
--embedder-for-target \
--disable-desktop-embeddings \
--build-tizen-shell \
Expand All @@ -69,6 +70,7 @@ jobs:
--target-sysroot `pwd`/tizen_tools/sysroot/$(arch)_40 \
--target-triple $(targetTriple) \
--runtime-mode $(mode) \
--enable-fontconfig \
--embedder-for-target \
--disable-desktop-embeddings \
--build-tizen-shell \
Expand All @@ -83,9 +85,6 @@ jobs:
cp default/out/linux_$(mode)_$(arch)/libflutter_tizen.so $OUTDIR
cp tizen40/out/linux_$(mode)_$(arch)/libflutter_tizen.so $OUTDIR/libflutter_tizen40.so
cp tizen40/out/linux_$(mode)_$(arch)/libflutter_engine.so $OUTDIR
if [ "$(System.JobName)" = "tizen-arm-release" ]; then
cp default/out/linux_$(mode)_$(arch)/icudtl.dat $OUTDIR
fi
displayName: Copy artifacts
workingDirectory: $(buildroot)/output
failOnStderr: true
Expand Down Expand Up @@ -115,12 +114,12 @@ jobs:
cp -r $ROOT/common/cpp/client_wrapper/include common/client_wrapper
cp $ROOT/tizen/public/*.h common/public
cp $ROOT/tizen/LICENSE .
displayName: Copy peripherals
displayName: Copy headers
workingDirectory: $(Build.BinariesDirectory)
failOnStderr: true
- bash: |
cp $(Pipeline.Workspace)/src/third_party/icu/flutter/icudtl.dat common
mv $(Pipeline.Workspace)/tizen-* .
mv tizen-arm-release/icudtl.dat common
for platform in linux windows darwin; do
for mode in release profile; do
curl -o tmp.zip https://storage.googleapis.com/flutter_infra/flutter/$(upstreamVersion)/android-arm-$mode/$platform-x64.zip 2> /dev/null
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/tizen/channels/localization_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void LocalizationChannel::SendLocales() {
FlutterLocale* flutter_locale = nullptr;
std::vector<FlutterLocale*> flutter_locales;

int ret = i18n_ulocale_set_default(getenv("LC_TIME"));
int ret = i18n_ulocale_set_default(getenv("LANG"));
ret = i18n_ulocale_get_default(&defualt_locale);
if (ret != I18N_ERROR_NONE) {
FT_LOGE("i18n_ulocale_get_default() failed.");
Expand Down

0 comments on commit 4ab2db5

Please sign in to comment.