monospace

Are Android monospace fonts actually fixed size?

依然范特西╮ 提交于 2020-01-06 15:25:15
问题 I am using the Android Monospace font for my game and have found that the font does not behave as expected. The game relies on the top characters and the underscores below being lined up with each other as clues to solve the cryptogram. However when the word is very close to the edge of the TextView as can be seen on the 5th line shown in the image the blue line of text goes onto the next line causing the clues and answers to be out of sync. I'm using TextView.setTypeface(Typeface.MONOSPACE)

Setting WPF RichTextBox width and height according to the size of a monospace font

北战南征 提交于 2020-01-02 05:24:09
问题 I am trying to fit a WPF RichTextBox to exactly accommodate a grid of characters in a particular monospace font. I am currently using FormattedText to determine the width and height of my RichTextBox, but the measurements it is providing me with are too small--specifically two characters in width too small. Is there a better way to perform this task? This does not seem to be an appropriate way to determine the size of my control. RichTextBox rtb; rtb = new RichTextBox(); FontFamily fontFamily

What's happened to Monospace in Android Lollipop?

偶尔善良 提交于 2019-12-21 08:17:13
问题 I have a style to use "monospace" in my Android App: <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" > <!-- Customize your theme here. --> <item name="android:windowNoTitle">true</item> <item name="android:typeface">monospace</item> <item name="android:textColorPrimary">@android:color/white</item> <item name="android

Android monospace space ( ) width is different than character width

南笙酒味 提交于 2019-12-12 19:17:33
问题 I'm developing a little webapp. I tried displaying some output in an sort of ascii art way, using boxdrawing characters. However, I noticed that on Android the space (   ) isn't equal width with the other characters, leading to ugly output. I've put the font as monospace and even tried the monospace,monospace CSS setting. To see what I'm talking about: Please open https://tpgnow.herokuapp.com/CERN on Android and on a desktop browser. Expected Output (desktop browser): Actual Output (android

How do you change the font face Sublime uses for the sidebar?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 16:25:18
问题 Is this even possible in Sublime Text 2? Since the default preferences says: // The theme controls the look of Sublime Text's UI (buttons, tabs, scroll bars, etc) "theme": "Default.sublime-theme", I tried modifying that file (under /Data/Packages/Theme - Default/Default.sublime-theme ) by adding this line: { "class": "sidebar_label" , "color": [0, 0, 0] , "font.bold": false , "shadow_color": [250, 250, 250], "shadow_offset": [0, 0] , "font.face": "monospace" // ADDED THIS LINE ("monofur" is

xamarin ios monospaced Numbers using UIFontFeature - does anyone know why this doesn't work

霸气de小男生 提交于 2019-12-11 04:17:28
问题 I thought it was now possible in IOS apps to force your numbers to be monospaced when using a custom font. I've found examples and used some code that compiles but my number spacing is still proportional. Has anyone got this working and if so what am I doing wrong?! Here is my code: UIFont bigNumberFont = UIFont.FromName("Dosis-Light", 60f); var originalDescriptor = bigNumberFont.FontDescriptor; var attributes = new UIFontAttributes(new UIFontFeature(CTFontFeatureNumberSpacing.Selector

Monospace Font - Not really Monospace?

大憨熊 提交于 2019-12-11 02:43:30
问题 This appears to be a bug that I've found using JavaScript in Gedit (when you change the font from "Ubuntu mono" to "Monospace") and Geany so far. I have a right margin set to 80 chars, but when I type Object , prototype or any other key word bolded by the program, It adds some letter spacing that throws off the spacing just slightly. Because of this, I have a line declaring Object that's 79 characters, but appears to be 81.5 characters. Can someone advise me on how to fix this? Is it a Text

How to display special unicode characters using monospace font in HTML with preserved character width

六月ゝ 毕业季﹏ 提交于 2019-12-10 12:59:21
问题 I'm using pre element to display some text including special unicode characters (⚡ ⚑ ▶ ◀ ⁋). I noticed that browsers render these special characters wider than regular ones, occupying more space horizontally. This can be easily seen here: https://gist.github.com/968b5c22cce14909cf27 Both lines have 20 characters but notice that first one is longer (screen pixels). Is there a way (CSS) to force pre elements (or other element with monospace font applied) to have really fixed character width? I

Android Monospace fonts aren't fixed width

你说的曾经没有我的故事 提交于 2019-12-08 21:03:50
I'm writing a custom View for a timer, but I can't get a properly fixed-width font for the numbers in the middle. Here's the relevant code (from two different methods): mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); mTextPaint.setTypeface(Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL)); // Get rectangle that is the size of the text mTextPaint.getTextBounds( getTimeText(), 0, getTimeText().length(), mTextBounds); // X and Y coordinates of text float mTextPosX = (width / 2) - (mTextBounds.width() / 2); float mTextPosY = (height / 2) + (mTextBounds.height() / 2); // Draw text canvas

Android Monospace fonts aren't fixed width

半城伤御伤魂 提交于 2019-12-08 07:28:56
问题 I'm writing a custom View for a timer, but I can't get a properly fixed-width font for the numbers in the middle. Here's the relevant code (from two different methods): mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); mTextPaint.setTypeface(Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL)); // Get rectangle that is the size of the text mTextPaint.getTextBounds( getTimeText(), 0, getTimeText().length(), mTextBounds); // X and Y coordinates of text float mTextPosX = (width / 2) -