Skip to content

Commit

Permalink
Add a replacement font to Courier New (#629)
Browse files Browse the repository at this point in the history
* Add a replacement fonts to Courier New: Ubuntu Mono and Monospaced
---------
Co-authored-by: rcassani <[email protected]>
  • Loading branch information
Edouard2laire authored Jul 5, 2023
1 parent a2732fc commit 11b3c6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion toolbox/core/bst_get.m
Original file line number Diff line number Diff line change
Expand Up @@ -3920,7 +3920,11 @@
% Font types
fontTypes = {};
if (nargin >= 3)
fontTypes{end + 1} = varargin{3};
if ischar(varargin{3})
fontTypes = varargin(3);
else
fontTypes = varargin{3};
end
else
fontTypes{end + 1} = 'Arial'; % Default font
fontTypes{end + 1} = 'Liberation Sans'; % Free Arial substitute
Expand Down
2 changes: 1 addition & 1 deletion toolbox/gui/view_text.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
jTextArea.setEditable(0);
jTextArea.setBackground(Color(1,1,1));
jTextArea.setMargin(java_create('java.awt.Insets', 'IIII', 10,25,10,25));
jTextArea.setFont(bst_get('Font', 12, 'Courier New'));
jTextArea.setFont(bst_get('Font', 12, {'Courier New', 'Ubuntu Mono', 'Monospaced'}));
jFrame.getContentPane.add(JScrollPane(jTextArea));

% Add OK button if need to wait
Expand Down

0 comments on commit 11b3c6a

Please sign in to comment.