text-size

Is there any way to change the text size (font size) of specific blocks when you using asciidoc?

岁酱吖の 提交于 2021-02-18 22:33:09
问题 I need your help. Now I am using AsciiDoc and AsciiDoctor to create some manuals. I want texts smaller on some specific blocks, for example wide table, wide list, and so on, but not want main texts smaller. Especially I need to make texts of wide tables smaller as my customer requests so. Is there any way? 回答1: You mention lists and tables... About lists, it can't be done as stated in AsciiDoctor Documentation: Unsupported Complex AsciiDoc markup is not permitted in attribute values, such as:

Is there any way to change the text size (font size) of specific blocks when you using asciidoc?

混江龙づ霸主 提交于 2021-02-18 22:32:27
问题 I need your help. Now I am using AsciiDoc and AsciiDoctor to create some manuals. I want texts smaller on some specific blocks, for example wide table, wide list, and so on, but not want main texts smaller. Especially I need to make texts of wide tables smaller as my customer requests so. Is there any way? 回答1: You mention lists and tables... About lists, it can't be done as stated in AsciiDoctor Documentation: Unsupported Complex AsciiDoc markup is not permitted in attribute values, such as:

How do I get a JTable header to display entire column names instead of shortening them?

吃可爱长大的小学妹 提交于 2019-12-30 18:54:27
问题 I've a JTable that I fill with a class that extends AbstractTableModel. The problem is that the columns are too short to display the column name. I've turned off Jtable AutoResizeMode property, but shortening still occurs. How do I solve this? 回答1: Setting off autoresizemode only prevent the JTable's coumns to be resized. To force a particular width retrieve the table column model: TableColumn column = jtable.getColumnModel().getColumn(col_num); and set the desired width: column

How to set text size in WebView in android

蹲街弑〆低调 提交于 2019-12-28 09:18:37
问题 I am using WebView to justify text. I want to know- Is it possible to set the text size in layout file? As I want different text size for different screen sizes. And also one problem is first background appears then after 2 second text display. Is it possible to display text immediately? Size of text is 7-8 lines . Code- public class Main extends Activity { WebView mWebView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout

How to assign text size in sp value using java code

爱⌒轻易说出口 提交于 2019-12-28 04:38:24
问题 If I assign an integer value to change a certain text size of a TextView using java code, the value is interpreted as pixel ( px ). Now does anyone know how to assign it in sp ? 回答1: http://developer.android.com/reference/android/widget/TextView.html#setTextSize%28int,%20float%29 Example: textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 65); 回答2: You can use a DisplayMetrics object to help convert between pixels and scaled pixels with the scaledDensity attribute. DisplayMetrics dm = new

Fixed text size in WebView Android (Lollipop)

陌路散爱 提交于 2019-12-23 11:59:17
问题 I have this simple code in WebView <tr><td valign='top' width='30%'><span style='font-size:11px !important;'> @label</span></td><td valign='top' width='2%'><span style='font-size:11px !important;'>:</span></td><td ><span style='font-size:11px !important;word-break:keep-all;'> @val</span></td></tr> How to have fixed font size of 11px? If I increase/decrease the system font-size in display settings, the above code works perfectly fine in pre-lollipop version. But in Lollipop the font size is

Getting weird font size after setting it programmatically

倾然丶 夕夏残阳落幕 提交于 2019-12-23 03:45:07
问题 I am trying to set TextView font size programmatically. txtView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16); But when I check this size via Toast.makeText(this, "txt: " + txtView.getTextSize(), Toast.LENGTH_SHORT).show(); The Toast shows that the size is "24" which is 50% larger then the one I set before. I tested multiple values and always get the same result: 8 becomes 12 10 becomes 15 15 becomes 22.5 etc. The font I am trying to set always becomes 50% larger. Why is this happening? Where

How to convert text width in pixels to percent of screen width/height?

帅比萌擦擦* 提交于 2019-12-21 17:41:55
问题 I am measuring a string text to see if I should add a \n for wrapping. I am using the Paint.measureText function, and it works most of the time but it occurs to me that this isn't accurate since a px doesn't equal a dp - I've seen online how to convert pixels to dp, but instead what I would rather do is convert px to a percentage of the screen size for example If a is 8 pixels wide, how would I say: float LetterWidthPercent = _______ //get width of character in percent of screen width float

Changing text size inside Tabs

£可爱£侵袭症+ 提交于 2019-12-20 01:06:09
问题 I am designing my app for various screen sizes,but I have a small problem. I can't change the size of the text inside the tabs. Here is what I did. Firstly I created my own style. <style name="MineCustomTabText" parent="TextAppearance.Design.Tab"> <item name="android:textSize">22sp</item> </style> And then I use this style to the appropriate xml file. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas

Changing text size inside Tabs

南楼画角 提交于 2019-12-20 01:04:52
问题 I am designing my app for various screen sizes,but I have a small problem. I can't change the size of the text inside the tabs. Here is what I did. Firstly I created my own style. <style name="MineCustomTabText" parent="TextAppearance.Design.Tab"> <item name="android:textSize">22sp</item> </style> And then I use this style to the appropriate xml file. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas