Skip to content

Commit

Permalink
switch all monospaced fonts on iOS to menlo
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Sep 14, 2017
1 parent c6fe456 commit a24ede3
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/App/Controls/PinControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public PinControl()
{
HorizontalTextAlignment = TextAlignment.Center,
FontSize = 35,
FontFamily = Helpers.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier")
FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier")
};

Entry = new ExtendedEntry
Expand Down
2 changes: 1 addition & 1 deletion src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void Init()
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
Margin = new Thickness(15, 40, 15, 40),
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,
VerticalOptions = LayoutOptions.Start
};
Expand Down
4 changes: 2 additions & 2 deletions src/App/Pages/Vault/VaultAddLoginPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ private void Init()
}
TotpCell.Entry.DisableAutocapitalize = true;
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,
useButton: true);
PasswordCell.Button.Image = "eye";
PasswordCell.Entry.DisableAutocapitalize = true;
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.Entry.DisableAutocapitalize = true;
Expand Down
4 changes: 2 additions & 2 deletions src/App/Pages/Vault/VaultEditLoginPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ private void Init()
TotpCell.Entry.Text = login.Totp?.Decrypt(login.OrganizationId);
TotpCell.Entry.DisableAutocapitalize = true;
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,
useButton: true);
PasswordCell.Entry.Text = login.Password?.Decrypt(login.OrganizationId);
PasswordCell.Button.Image = "eye";
PasswordCell.Entry.DisableAutocapitalize = true;
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.Entry.Text = login.Username?.Decrypt(login.OrganizationId);
Expand Down
4 changes: 2 additions & 2 deletions src/App/Pages/Vault/VaultViewLoginPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private void Init()
}
PasswordCell.Button1.Command = new Command(() => Model.RevealPassword = !Model.RevealPassword);
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;

// URI
Expand All @@ -103,7 +103,7 @@ private void Init()
TotpCodeCell.Button1.Command = new Command(() => Copy(Model.TotpCode, AppResources.VerificationCodeTotp));
TotpCodeCell.Sub.SetBinding(Label.TextProperty, nameof(VaultViewLoginPageModel.TotpSecond));
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
NotesCell = new LabeledValueCell();
Expand Down
2 changes: 1 addition & 1 deletion src/iOS.Extension/LockPinViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override void ViewDidLoad()
View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f);

var descriptor = UIFontDescriptor.PreferredBody;
PinLabel.Font = UIFont.FromName("Courier", 35);
PinLabel.Font = UIFont.FromName("Menlo-Regular", 35);

InstructionLabel.Text = AppResources.EnterPIN;
InstructionLabel.LineBreakMode = UILineBreakMode.WordWrap;
Expand Down
4 changes: 2 additions & 2 deletions src/iOS.Extension/MainInterface.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<rect key="frame" x="30" y="104" width="540" height="17"/>
<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"/>
<nil key="highlightedColor"/>
</label>
<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"/>
<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"/>
<color key="backgroundColor" colorSpace="calibratedWhite" white="0" alpha="0"/>
<color key="tintColor" colorSpace="calibratedWhite" white="0" alpha="0"/>
Expand Down
2 changes: 1 addition & 1 deletion src/iOS.Extension/PasswordGeneratorViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public override void ViewDidLoad()
View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f);

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.Lines = 1;
PasswordLabel.AdjustsFontSizeToFitWidth = false;
Expand Down

0 comments on commit a24ede3

Please sign in to comment.