switch all monospaced fonts on iOS to menlo

This commit is contained in:
Kyle Spearrin 2017-09-14 15:17:28 -04:00
parent c6fe456cac
commit a24ede364d
8 changed files with 12 additions and 12 deletions

View file

@ -14,7 +14,7 @@ namespace Bit.App.Controls
{ {
HorizontalTextAlignment = TextAlignment.Center, HorizontalTextAlignment = TextAlignment.Center,
FontSize = 35, FontSize = 35,
FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier") FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier")
}; };
Entry = new ExtendedEntry Entry = new ExtendedEntry

View file

@ -49,7 +49,7 @@ namespace Bit.App.Pages
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)), FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
Margin = new Thickness(15, 40, 15, 40), Margin = new Thickness(15, 40, 15, 40),
HorizontalTextAlignment = TextAlignment.Center, HorizontalTextAlignment = TextAlignment.Center,
FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"), FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier"),
LineBreakMode = LineBreakMode.TailTruncation, LineBreakMode = LineBreakMode.TailTruncation,
VerticalOptions = LayoutOptions.Start VerticalOptions = LayoutOptions.Start
}; };

View file

@ -70,14 +70,14 @@ namespace Bit.App.Pages
} }
TotpCell.Entry.DisableAutocapitalize = true; TotpCell.Entry.DisableAutocapitalize = true;
TotpCell.Entry.Autocorrect = false; TotpCell.Entry.Autocorrect = false;
TotpCell.Entry.FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); TotpCell.Entry.FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
PasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: TotpCell.Entry, PasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: TotpCell.Entry,
useButton: true); useButton: true);
PasswordCell.Button.Image = "eye"; PasswordCell.Button.Image = "eye";
PasswordCell.Entry.DisableAutocapitalize = true; PasswordCell.Entry.DisableAutocapitalize = true;
PasswordCell.Entry.Autocorrect = false; PasswordCell.Entry.Autocorrect = false;
PasswordCell.Entry.FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); PasswordCell.Entry.FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
UsernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry); UsernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry);
UsernameCell.Entry.DisableAutocapitalize = true; UsernameCell.Entry.DisableAutocapitalize = true;

View file

@ -68,7 +68,7 @@ namespace Bit.App.Pages
TotpCell.Entry.Text = login.Totp?.Decrypt(login.OrganizationId); TotpCell.Entry.Text = login.Totp?.Decrypt(login.OrganizationId);
TotpCell.Entry.DisableAutocapitalize = true; TotpCell.Entry.DisableAutocapitalize = true;
TotpCell.Entry.Autocorrect = false; TotpCell.Entry.Autocorrect = false;
TotpCell.Entry.FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); TotpCell.Entry.FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
PasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: TotpCell.Entry, PasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: TotpCell.Entry,
useButton: true); useButton: true);
@ -76,7 +76,7 @@ namespace Bit.App.Pages
PasswordCell.Button.Image = "eye"; PasswordCell.Button.Image = "eye";
PasswordCell.Entry.DisableAutocapitalize = true; PasswordCell.Entry.DisableAutocapitalize = true;
PasswordCell.Entry.Autocorrect = false; PasswordCell.Entry.Autocorrect = false;
PasswordCell.Entry.FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); PasswordCell.Entry.FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
UsernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry); UsernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry);
UsernameCell.Entry.Text = login.Username?.Decrypt(login.OrganizationId); UsernameCell.Entry.Text = login.Username?.Decrypt(login.OrganizationId);

View file

@ -77,7 +77,7 @@ namespace Bit.App.Pages
} }
PasswordCell.Button1.Command = new Command(() => Model.RevealPassword = !Model.RevealPassword); PasswordCell.Button1.Command = new Command(() => Model.RevealPassword = !Model.RevealPassword);
PasswordCell.Button2.Command = new Command(() => Copy(Model.Password, AppResources.Password)); PasswordCell.Button2.Command = new Command(() => Copy(Model.Password, AppResources.Password));
PasswordCell.Value.FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); PasswordCell.Value.FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
PasswordCell.Value.LineBreakMode = LineBreakMode.WordWrap; PasswordCell.Value.LineBreakMode = LineBreakMode.WordWrap;
// URI // URI
@ -103,7 +103,7 @@ namespace Bit.App.Pages
TotpCodeCell.Button1.Command = new Command(() => Copy(Model.TotpCode, AppResources.VerificationCodeTotp)); TotpCodeCell.Button1.Command = new Command(() => Copy(Model.TotpCode, AppResources.VerificationCodeTotp));
TotpCodeCell.Sub.SetBinding(Label.TextProperty, nameof(VaultViewLoginPageModel.TotpSecond)); TotpCodeCell.Sub.SetBinding(Label.TextProperty, nameof(VaultViewLoginPageModel.TotpSecond));
TotpCodeCell.Sub.SetBinding(Label.TextColorProperty, nameof(VaultViewLoginPageModel.TotpColor)); TotpCodeCell.Sub.SetBinding(Label.TextColorProperty, nameof(VaultViewLoginPageModel.TotpColor));
TotpCodeCell.Value.FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); TotpCodeCell.Value.FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
// Notes // Notes
NotesCell = new LabeledValueCell(); NotesCell = new LabeledValueCell();

View file

@ -40,7 +40,7 @@ namespace Bit.iOS.Extension
View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f); View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f);
var descriptor = UIFontDescriptor.PreferredBody; var descriptor = UIFontDescriptor.PreferredBody;
PinLabel.Font = UIFont.FromName("Courier", 35); PinLabel.Font = UIFont.FromName("Menlo-Regular", 35);
InstructionLabel.Text = AppResources.EnterPIN; InstructionLabel.Text = AppResources.EnterPIN;
InstructionLabel.LineBreakMode = UILineBreakMode.WordWrap; InstructionLabel.LineBreakMode = UILineBreakMode.WordWrap;

View file

@ -396,13 +396,13 @@
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="- - - -" lineBreakMode="tailTruncation" minimumFontSize="10" id="7373" translatesAutoresizingMaskIntoConstraints="NO" textAlignment="center" misplaced="YES"> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="- - - -" lineBreakMode="tailTruncation" minimumFontSize="10" id="7373" translatesAutoresizingMaskIntoConstraints="NO" textAlignment="center" misplaced="YES">
<rect key="frame" x="30" y="104" width="540" height="17"/> <rect key="frame" x="30" y="104" width="540" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" name="Courier" family="Courier" pointSize="40"/> <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="40"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" id="7350" translatesAutoresizingMaskIntoConstraints="NO" textAlignment="center" misplaced="YES"> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" id="7350" translatesAutoresizingMaskIntoConstraints="NO" textAlignment="center" misplaced="YES">
<rect key="frame" x="30" y="79" width="540" height="77"/> <rect key="frame" x="30" y="79" width="540" height="77"/>
<fontDescription key="fontDescription" name="Courier-BoldOblique" family="Courier" pointSize="14"/> <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="14"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
<color key="backgroundColor" colorSpace="calibratedWhite" white="0" alpha="0"/> <color key="backgroundColor" colorSpace="calibratedWhite" white="0" alpha="0"/>
<color key="tintColor" colorSpace="calibratedWhite" white="0" alpha="0"/> <color key="tintColor" colorSpace="calibratedWhite" white="0" alpha="0"/>

View file

@ -54,7 +54,7 @@ namespace Bit.iOS.Extension
View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f); View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f);
var descriptor = UIFontDescriptor.PreferredBody; var descriptor = UIFontDescriptor.PreferredBody;
PasswordLabel.Font = UIFont.FromName("Courier", descriptor.PointSize * 1.3f); PasswordLabel.Font = UIFont.FromName("Menlo-Regular", descriptor.PointSize * 1.3f);
PasswordLabel.LineBreakMode = UILineBreakMode.TailTruncation; PasswordLabel.LineBreakMode = UILineBreakMode.TailTruncation;
PasswordLabel.Lines = 1; PasswordLabel.Lines = 1;
PasswordLabel.AdjustsFontSizeToFitWidth = false; PasswordLabel.AdjustsFontSizeToFitWidth = false;