Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update fonts
  • Loading branch information
vshcherb committed Sep 9, 2015
1 parent 32a0b65 commit ee4ee52
Show file tree
Hide file tree
Showing 36 changed files with 42 additions and 299 deletions.
8 changes: 4 additions & 4 deletions OsmAnd-java/src/net/osmand/NativeLibrary.java
Expand Up @@ -281,13 +281,13 @@ public static int ccmp(int lhs, int rhs) {
return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1);
}

public static void loadFontData(String dir) {
File dr = new File(dir);
if (dr.listFiles() == null) {
public void loadFontData(File dr) {
File[] lf = dr.listFiles();
if (lf == null) {
System.err.println("No fonts loaded from " + dr.getAbsolutePath());
return;
}
ArrayList<File> lst = new ArrayList<File>(Arrays.asList(dr.listFiles()));
ArrayList<File> lst = new ArrayList<File>(Arrays.asList(lf));
Collections.sort(lst, new Comparator<File>() {


Expand Down
1 change: 1 addition & 0 deletions OsmAnd/.gitignore
Expand Up @@ -3,6 +3,7 @@ dist/
res/values/no_translate.xml
assets/specialphrases/*
assets/voice/*
assets/fonts/*
gen/
local.properties
raw/
Expand Down
15 changes: 6 additions & 9 deletions OsmAnd/assets/bundled_assets.xml
Expand Up @@ -43,14 +43,11 @@
<asset source="voice/ru/config.p" destination="voice/ru/_config.p" mode="overwriteOnlyIfExists" />


<!-- TODO delete deprecated
<asset source="voice/fr-ov/config.p" destination="voice/fr/_config.p" mode="overwriteOnlyIfExists" />
<asset source="voice/he-ov/config.p" destination="voice/he/_config.p" mode="overwriteOnlyIfExists" />
<asset source="voice/it-Chiara-ov/config.p" destination="voice/it-Chiara/_config.p" mode="overwriteOnlyIfExists" />
<asset source="voice/it-Roberto-ov/config.p" destination="voice/it-Roberto/_config.p" mode="overwriteOnlyIfExists" />
<asset source="voice/ru2-ov/config.p" destination="voice/ru2/_config.p" mode="overwriteOnlyIfExists" />
<asset source="voice/ru3-ov/config.p" destination="voice/ru3/_config.p" mode="overwriteOnlyIfExists" />
<asset source="voice/sk-Ruzena-ov/config.p" destination="voice/sk-Ruzena/_config.p" mode="overwriteOnlyIfExists" />
-->
<asset source="fonts/OpenSans-Italic.ttf" destination="fonts/OpenSans-Italic.ttf" mode="alwaysOverwriteOrCopy" />
<asset source="fonts/OpenSans-Regular.ttf" destination="fonts/OpenSans-Regular.ttf" mode="alwaysOverwriteOrCopy" />
<asset source="fonts/OpenSans-Semibold.ttf" destination="fonts/OpenSans-Semibold.ttf" mode="alwaysOverwriteOrCopy" />
<asset source="fonts/OpenSans-SemiboldItalic.ttf" destination="fonts/OpenSans-SemiboldItalic.ttf" mode="alwaysOverwriteOrCopy" />


<asset source="sounds/camera_click.ogg" destination="sounds/camera_click.ogg" mode="copyOnlyIfDoesNotExist" />
</assets>
Binary file removed OsmAnd/assets/fonts/Roboto-Medium.ttf
Binary file not shown.
Binary file removed OsmAnd/assets/fonts/Roboto-Regular.ttf
Binary file not shown.
11 changes: 10 additions & 1 deletion OsmAnd/build.gradle
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "23.0.0"
buildToolsVersion "23.0.1"

signingConfigs {
development {
Expand Down Expand Up @@ -190,6 +190,14 @@ task collectVoiceAssets(type: Sync) {
include "**/*.p"
}


task collectFonts(type: Copy) {
from "../../resources/fonts"
from "../../resources/rendering_styles/fonts/OpenSans"
into "assets/fonts"
include "*.ttf"
}

task collectHelpContentsAssets(type: Sync) {
from "../../help/help"
into "assets/help"
Expand Down Expand Up @@ -237,6 +245,7 @@ task copyStyleIcons(type: Copy) {

task collectExternalResources << {}
collectExternalResources.dependsOn collectVoiceAssets,
collectFonts,
collectHelpContentsAssets,
collectRoutingResources,
collectRenderingStylesResources,
Expand Down
8 changes: 8 additions & 0 deletions OsmAnd/build.xml
Expand Up @@ -81,6 +81,14 @@
<include name="voice/**/*.p" />
</fileset>
</copy>
<copy todir="assets/fonts">
<fileset dir="../../resources/fonts">
<include name="*.ttf" />
</fileset>
<fileset dir="../../resources/rendering_styles/fonts/OpenSans">
<include name="*.ttf" />
</fileset>
</copy>
<copy todir="res/">
<fileset dir="../../resources/rendering_styles/style-icons/" >
<include name="**/*" />
Expand Down
7 changes: 6 additions & 1 deletion OsmAnd/src/net/osmand/plus/AppInitializer.java
Expand Up @@ -442,11 +442,16 @@ private void initNativeCore() {
osmandSettings.NATIVE_RENDERING_FAILED.set(true);
startTask(app.getString(R.string.init_native_library), -1);
RenderingRulesStorage storage = app.getRendererRegistry().getCurrentSelectedRenderer();
boolean initialized = NativeOsmandLibrary.getLibrary(storage, app) != null;
NativeOsmandLibrary lib = NativeOsmandLibrary.getLibrary(storage, app);
boolean initialized = lib != null;
osmandSettings.NATIVE_RENDERING_FAILED.set(false);
if (!initialized) {
LOG.info("Native library could not be loaded!");
} else {
File ls = app.getAppPath("fonts");
lib.loadFontData(ls);
}

}
app.getResourceManager().initMapBoundariesCacheNative();
}
Expand Down
2 changes: 1 addition & 1 deletion eclipse-compile/appcompat/build.gradle
Expand Up @@ -6,7 +6,7 @@ dependencies {

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
buildToolsVersion "23.0.1"

defaultConfig {
minSdkVersion 9
Expand Down
2 changes: 1 addition & 1 deletion eclipse-compile/cardview/build.gradle
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
buildToolsVersion "23.0.1"

defaultConfig {
minSdkVersion 7
Expand Down
2 changes: 1 addition & 1 deletion eclipse-compile/design/build.gradle
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
buildToolsVersion "23.0.1"

defaultConfig {
minSdkVersion 9
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/Osmand-Nautical/build.gradle
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
buildToolsVersion "23.0.1"

signingConfigs {
development {
Expand Down
2 changes: 1 addition & 1 deletion plugins/Osmand-ParkingPlugin/build.gradle
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
buildToolsVersion "23.0.1"

signingConfigs {
development {
Expand Down
2 changes: 1 addition & 1 deletion plugins/Osmand-SRTMPlugin/build.gradle
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
buildToolsVersion "23.0.1"

signingConfigs {
development {
Expand Down
9 changes: 0 additions & 9 deletions plugins/Osmand-Sherpafy/.classpath

This file was deleted.

4 changes: 0 additions & 4 deletions plugins/Osmand-Sherpafy/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions plugins/Osmand-Sherpafy/.project

This file was deleted.

24 changes: 0 additions & 24 deletions plugins/Osmand-Sherpafy/AndroidManifest.xml

This file was deleted.

67 changes: 0 additions & 67 deletions plugins/Osmand-Sherpafy/build.gradle

This file was deleted.

20 changes: 0 additions & 20 deletions plugins/Osmand-Sherpafy/proguard-project.txt

This file was deleted.

14 changes: 0 additions & 14 deletions plugins/Osmand-Sherpafy/project.properties

This file was deleted.

Binary file not shown.
Binary file removed plugins/Osmand-Sherpafy/res/drawable-hdpi/icon.png
Binary file not shown.
Binary file not shown.
Binary file removed plugins/Osmand-Sherpafy/res/drawable-ldpi/icon.png
Binary file not shown.
Binary file not shown.
Binary file removed plugins/Osmand-Sherpafy/res/drawable-mdpi/icon.png
Binary file not shown.
Binary file not shown.
Binary file removed plugins/Osmand-Sherpafy/res/drawable-xhdpi/icon.png
Binary file not shown.
13 changes: 0 additions & 13 deletions plugins/Osmand-Sherpafy/res/layout/main.xml

This file was deleted.

8 changes: 0 additions & 8 deletions plugins/Osmand-Sherpafy/res/values/strings.xml

This file was deleted.

0 comments on commit ee4ee52

Please sign in to comment.