Skip to content

Commit

Permalink
Fixed fonts, added cyrillic support & russian localization
Browse files Browse the repository at this point in the history
  • Loading branch information
VityaSchel committed Sep 29, 2023
1 parent e050e27 commit b654a17
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 16 deletions.
Binary file added Shared/fonts/samsungsharpsans-bold.ttf
Binary file not shown.
File renamed without changes.
20 changes: 10 additions & 10 deletions samsung-pinger.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
A714E6942AC5CF7F006C139D /* widget.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = A714E68E2AC5CF7D006C139D /* widget.intentdefinition */; };
A714E6972AC5CF7F006C139D /* widgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = A714E6852AC5CF7D006C139D /* widgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
A74393A62AC6C174000A5682 /* RingingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74393A52AC6C174000A5682 /* RingingView.swift */; };
A74393AD2AC6C487000A5682 /* samsungsharpsans-bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = A74393AC2AC6C487000A5682 /* samsungsharpsans-bold.otf */; };
A74393AE2AC6C487000A5682 /* samsungsharpsans-bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = A74393AC2AC6C487000A5682 /* samsungsharpsans-bold.otf */; };
A74393B22AC6CBAD000A5682 /* samsungsharpsans-medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = A74393B12AC6CBAD000A5682 /* samsungsharpsans-medium.otf */; };
A74393B32AC6CBAD000A5682 /* samsungsharpsans-medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = A74393B12AC6CBAD000A5682 /* samsungsharpsans-medium.otf */; };
A74393B62AC6CDD0000A5682 /* samsungsharpsans-bold.otf in Copy Files */ = {isa = PBXBuildFile; fileRef = A74393AC2AC6C487000A5682 /* samsungsharpsans-bold.otf */; };
A74393B72AC6CDD2000A5682 /* samsungsharpsans-medium.otf in Copy Files */ = {isa = PBXBuildFile; fileRef = A74393B12AC6CBAD000A5682 /* samsungsharpsans-medium.otf */; };
A76669EC2AC7317E005FE393 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A76669EF2AC7317E005FE393 /* Localizable.strings */; };
A76669ED2AC7317E005FE393 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A76669EF2AC7317E005FE393 /* Localizable.strings */; };
A7B594A02AC73E0D00F6E019 /* samsungsharpsans-bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A7B5949F2AC73E0D00F6E019 /* samsungsharpsans-bold.ttf */; };
A7B594A12AC73E0D00F6E019 /* samsungsharpsans-bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A7B5949F2AC73E0D00F6E019 /* samsungsharpsans-bold.ttf */; };
A7B594A22AC73E3300F6E019 /* samsungsharpsans-bold.ttf in Copy Files */ = {isa = PBXBuildFile; fileRef = A7B5949F2AC73E0D00F6E019 /* samsungsharpsans-bold.ttf */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -57,8 +57,8 @@
dstPath = Fonts;
dstSubfolderSpec = 7;
files = (
A7B594A22AC73E3300F6E019 /* samsungsharpsans-bold.ttf in Copy Files */,
A74393B72AC6CDD2000A5682 /* samsungsharpsans-medium.otf in Copy Files */,
A74393B62AC6CDD0000A5682 /* samsungsharpsans-bold.otf in Copy Files */,
);
name = "Copy Files";
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -81,11 +81,11 @@
A714E6912AC5CF7F006C139D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A714E6922AC5CF7F006C139D /* widget.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = widget.entitlements; sourceTree = "<group>"; };
A74393A52AC6C174000A5682 /* RingingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RingingView.swift; sourceTree = "<group>"; };
A74393AC2AC6C487000A5682 /* samsungsharpsans-bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "samsungsharpsans-bold.otf"; sourceTree = "<group>"; };
A74393B02AC6CAEF000A5682 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
A74393B12AC6CBAD000A5682 /* samsungsharpsans-medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "samsungsharpsans-medium.otf"; sourceTree = "<group>"; };
A76669EE2AC7317E005FE393 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
A76669F02AC73184005FE393 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
A7B5949F2AC73E0D00F6E019 /* samsungsharpsans-bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "samsungsharpsans-bold.ttf"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -136,7 +136,6 @@
A714E6742AC5CE86006C139D /* ContentView.swift */,
A74393A52AC6C174000A5682 /* RingingView.swift */,
A714E6762AC5CE87006C139D /* Assets.xcassets */,
A74393AB2AC6C443000A5682 /* fonts */,
A714E67B2AC5CE87006C139D /* samsung_pinger.entitlements */,
A714E6782AC5CE87006C139D /* Preview Content */,
);
Expand Down Expand Up @@ -175,7 +174,7 @@
A74393AB2AC6C443000A5682 /* fonts */ = {
isa = PBXGroup;
children = (
A74393AC2AC6C487000A5682 /* samsungsharpsans-bold.otf */,
A7B5949F2AC73E0D00F6E019 /* samsungsharpsans-bold.ttf */,
A74393B12AC6CBAD000A5682 /* samsungsharpsans-medium.otf */,
);
path = fonts;
Expand All @@ -184,6 +183,7 @@
A76669EA2AC73083005FE393 /* Shared */ = {
isa = PBXGroup;
children = (
A74393AB2AC6C443000A5682 /* fonts */,
A76669EF2AC7317E005FE393 /* Localizable.strings */,
);
path = Shared;
Expand Down Expand Up @@ -253,8 +253,8 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
ru,
Base,
);
mainGroup = A714E6662AC5CE85006C139D;
productRefGroup = A714E6702AC5CE86006C139D /* Products */;
Expand All @@ -276,7 +276,7 @@
A714E67A2AC5CE87006C139D /* Preview Assets.xcassets in Resources */,
A74393B22AC6CBAD000A5682 /* samsungsharpsans-medium.otf in Resources */,
A714E6772AC5CE87006C139D /* Assets.xcassets in Resources */,
A74393AD2AC6C487000A5682 /* samsungsharpsans-bold.otf in Resources */,
A7B594A02AC73E0D00F6E019 /* samsungsharpsans-bold.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -285,8 +285,8 @@
buildActionMask = 2147483647;
files = (
A714E6902AC5CF7F006C139D /* Assets.xcassets in Resources */,
A7B594A12AC73E0D00F6E019 /* samsungsharpsans-bold.ttf in Resources */,
A76669ED2AC7317E005FE393 /* Localizable.strings in Resources */,
A74393AE2AC6C487000A5682 /* samsungsharpsans-bold.otf in Resources */,
A74393B32AC6CBAD000A5682 /* samsungsharpsans-medium.otf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
1 change: 1 addition & 0 deletions samsung-pinger/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct ContentView: View {
.padding(.bottom, 20)
HStack {
Text("instructions_label")
// .font(.custom("Samsung Sharp Sans", size: 20).weight(.bold))
.fontWeight(.bold)
Button(action: {
if let url = URL(string: "https://github.com/vityaschel/samsung-pinger#setup") {
Expand Down
2 changes: 1 addition & 1 deletion samsung-pinger/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string>fonts/</string>
<key>UIAppFonts</key>
<array>
<string>samsungsharpsans-bold.otf</string>
<string>samsungsharpsans-bold.ttf</string>
<string>samsungsharpsans-medium.otf</string>
</array>
<key>CFBundleDisplayName</key>
Expand Down
2 changes: 1 addition & 1 deletion samsung-pinger/RingingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct RingingView: View {
VStack {
Text(ringState == "connecting" ? "ringing_view_connecting" : "ringing_view_ringing")
.foregroundColor(Color.white)
.font(.custom("Samsung Sharp Sans", size: 20).weight(.medium))
.font(.custom("Samsung Sharp Sans", size: 20).weight(Locale.current.languageCode == "ru" ? .bold : .medium))
}
} else {
VStack {
Expand Down
Binary file removed samsung-pinger/fonts/samsungsharpsans-bold.otf
Binary file not shown.
2 changes: 1 addition & 1 deletion samsung-pinger/samsung_pingerApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct samsung_pingerApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

init() {
registerCustomFont(fileName: "samsungsharpsans-bold", withExtension: "otf")
registerCustomFont(fileName: "samsungsharpsans-bold", withExtension: "ttf")
registerCustomFont(fileName: "samsungsharpsans-medium", withExtension: "otf")
}

Expand Down
6 changes: 3 additions & 3 deletions widget/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>ATSApplicationFontsPath</key>
<string>Shared/fonts/</string>
<string>fonts/</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -22,8 +22,8 @@
</dict>
<key>UIAppFonts</key>
<array>
<string>Shared/fonts/samsungsharpsans-bold.otf</string>
<string>Shared/fonts/samsungsharpsans-medium.otf</string>
<string>samsungsharpsans-bold.ttf</string>
<string>samsungsharpsans-medium.otf</string>
</array>
</dict>
</plist>

0 comments on commit b654a17

Please sign in to comment.