[Libreoffice-commits] online.git: configure.ac .gitignore ios/Mobile ios/Mobile.xcodeproj

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 27 15:08:44 UTC 2018


 .gitignore                           |    1 +
 configure.ac                         |   22 ++++++++++++++++++++++
 ios/Mobile.xcodeproj/project.pbxproj |    4 ++++
 ios/Mobile/Info.plist.in             |    1 +
 4 files changed, 28 insertions(+)

New commits:
commit 3c046b05487a786dccbd47a8e9cfaf44ff9fc345
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Nov 27 17:06:22 2018 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Nov 27 17:06:22 2018 +0200

    Add --with-iosapp-fonts option to bundle some 3rd-party fonts in the app
    
    Propagate the font files found in that folder to Info.plist and to the
    app bundle.
    
    Change-Id: I2c38b0d7d21dbdf3b7ffd3b4ae98e47b9ad74758

diff --git a/.gitignore b/.gitignore
index a853fa87f..7e2fcfaee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -81,6 +81,7 @@ docker/instdir
 docker/builddir
 
 ios/Mobile/Info.plist
+ios/Mobile/Fonts
 
 # symlinks created by configure for the iOS app Xcode project
 lobuilddir-symlink
diff --git a/configure.ac b/configure.ac
index bc7353d42..fbde02a02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,11 @@ AC_ARG_WITH([iosapp-appicon],
               AS_HELP_STRING([--with-iosapp-appicon=<path>],
                              [Point to a directory containing an icon set to use instead of the default empty one.]))
 
+AC_ARG_WITH([iosapp-fonts],
+              AS_HELP_STRING([--with-iosapp-fonts=<path>],
+                             [Point to a directory containing .ttf or .otf files to be bundled in the iOS app (and
+                              thus installed on the device for use of the LO core code).]))
+
 AC_ARG_ENABLE([gtkapp],
               AS_HELP_STRING([--enable-gtkapp],
                              [Use in a tree where the only purpose is to build the gtk+ "app" that is supposed
@@ -600,6 +605,23 @@ AC_CONFIG_LINKS([loolkitconfig.xcu:loolkitconfig.xcu])
 AC_CONFIG_LINKS([loleaflet/package.json:loleaflet/package.json])
 AC_LINK_FILES([loleaflet/node_shrinkwrap], [loleaflet/node_shrinkwrap])
 
+AS_IF([test "$ENABLE_IOSAPP" = "true"],
+      [
+       if test `uname -s` = "Darwin"; then
+          IOSAPP_FONTS=''
+          if test "$with_iosapp_fonts" != no -a -d "$with_iosapp_fonts"; then
+              AC_MSG_NOTICE([copying fonts to be bundled])
+              mkdir -p ios/Mobile/Fonts
+              IOSAPP_FONTS=`find "$with_iosapp_fonts" -type f |
+                            while read fname; do
+                               cp "$fname" ios/Mobile/Fonts
+                               echo '<string>Fonts/'$(basename $fname)'</string>'
+                            done`
+          fi
+       fi
+      ])
+AC_SUBST(IOSAPP_FONTS)
+
 AC_CONFIG_FILES([Makefile
                  gtk/Makefile
                  ios/config.h
diff --git a/ios/Mobile.xcodeproj/project.pbxproj b/ios/Mobile.xcodeproj/project.pbxproj
index a3adce50a..c5f58c506 100644
--- a/ios/Mobile.xcodeproj/project.pbxproj
+++ b/ios/Mobile.xcodeproj/project.pbxproj
@@ -31,6 +31,7 @@
 		BE5EB5DA2140363100E0826C /* ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D92140363100E0826C /* ios.mm */; };
 		BE5EB5DC2140480B00E0826C /* ICU.dat in Resources */ = {isa = PBXBuildFile; fileRef = BE5EB5DB2140480B00E0826C /* ICU.dat */; };
 		BE6362C22153B5B500F4237E /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE6362C12153B5B500F4237E /* MobileCoreServices.framework */; };
+		BE80E43221AD92F700859C97 /* Fonts in Resources */ = {isa = PBXBuildFile; fileRef = BE80E43121AD92F600859C97 /* Fonts */; };
 		BE8D772C2136762500AC58EA /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = BE8D772B2136762500AC58EA /* AppDelegate.mm */; };
 		BE8D772F2136762500AC58EA /* DocumentBrowserViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BE8D772E2136762500AC58EA /* DocumentBrowserViewController.mm */; };
 		BE8D77322136762500AC58EA /* DocumentViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BE8D77312136762500AC58EA /* DocumentViewController.mm */; };
@@ -334,6 +335,7 @@
 		BE5EB5DB2140480B00E0826C /* ICU.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = ICU.dat; path = ../../../ICU.dat; sourceTree = "<group>"; };
 		BE636210215101D000F4237E /* WebSocketHandler.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = WebSocketHandler.hpp; sourceTree = "<group>"; };
 		BE6362C12153B5B500F4237E /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		BE80E43121AD92F600859C97 /* Fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Fonts; path = Mobile/Fonts; sourceTree = SOURCE_ROOT; };
 		BE8D77272136762500AC58EA /* Mobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Mobile.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		BE8D772A2136762500AC58EA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		BE8D772B2136762500AC58EA /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = "<group>"; };
@@ -528,6 +530,7 @@
 		BE00F8922139494E001CE2D4 /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				BE80E43121AD92F600859C97 /* Fonts */,
 				BE8D85BE214055F2009F1860 /* config */,
 				BE8D85BB214055F2009F1860 /* filter */,
 				BE8D85C6214055F3009F1860 /* fundamentalrc */,
@@ -1328,6 +1331,7 @@
 				BE8D85D4214055F3009F1860 /* fundamentalrc in Resources */,
 				BE8D85C9214055F3009F1860 /* filter in Resources */,
 				BE8D85CD214055F3009F1860 /* registry in Resources */,
+				BE80E43221AD92F700859C97 /* Fonts in Resources */,
 				BE00F8A821396585001CE2D4 /* images in Resources */,
 				BE5EB5DC2140480B00E0826C /* ICU.dat in Resources */,
 				BE8D85CE214055F3009F1860 /* oovbaapi.rdb in Resources */,
diff --git a/ios/Mobile/Info.plist.in b/ios/Mobile/Info.plist.in
index 9087da624..a2b80f32d 100644
--- a/ios/Mobile/Info.plist.in
+++ b/ios/Mobile/Info.plist.in
@@ -20,6 +20,7 @@
         <string>share/fonts/truetype/LiberationSerif-BoldItalic.ttf</string>
         <string>share/fonts/truetype/LiberationSerif-Italic.ttf</string>
         <string>share/fonts/truetype/LiberationSerif-Regular.ttf</string>
+        @IOSAPP_FONTS@
 	</array>
 	<key>CFBundleLocalizations</key>
 	<array>


More information about the Libreoffice-commits mailing list