fonts

How to use SF Rounded font in SwiftUI?

时光怂恿深爱的人放手 提交于 2020-01-21 19:00:24
问题 I am trying to use the SF rounded font in my SwiftUI project, how would you set it? I already tried messing around with the .font() but it didn't work (I wasn't able to set it to this rounded font) 回答1: Text("Your Text").font(.system(.body, design: .rounded)) 回答2: I know the question is about SwiftUI, but I thought it could be helpful to also include an UIKit answer. let fontSize: CGFloat = 24 // Here we get San Francisco with the desired weight let systemFont = UIFont.systemFont(ofSize:

font weights differing in webkit and firefox

喜欢而已 提交于 2020-01-21 12:20:30
问题 Im finalizing a design for which ive been working soley in firefox up to this point, just taking it across to webkit the first time ive notice is my headings differ quite allot, they are in Helvetica Neue UltraLight 50px, so in css : font-family: "helvetica neue"; font-weight:100; font-size:50px; when viewed in firefox it looks like the version on the left viewed in webkit (safari, chrome, ios safari) it looks like the version on the right any idea how i can bring these two further closer

Unicode special characters appearing in Java console, but not in Swing

£可爱£侵袭症+ 提交于 2020-01-21 10:33:59
问题 I'm attempting to add some high-range unicode characters to a JLabel inside of a JFrame, but they only show up as boxes despite using a known supported font. However, when I print these same characters to the Eclipse console, they show up just fine. Here is my code, with "frame" being my JFrame and "textField1" being my JLabel. The Monaco font is the same font that the Eclipse console uses, and is know to support this unicode character: JFrame frame = new JFrame(); JLabel textField1 = new

How to set the paragraph of itext pdf file as rectangle with background color in Java

ぃ、小莉子 提交于 2020-01-21 08:31:52
问题 I am designing a pdf report using itext library.I have implemented a paragraph in it.Now as per my requirement i have to set this paragraph inside rectangular box with background color but i am not able to do it.. Here is my Itext code in java... Font f = new Font(FontFamily.TIMES_ROMAN, 25.0f, Font.BOLD, BaseColor.CYAN); Paragraph p = new Paragraph("Total Cost:" + dbsumcallcost, f); document.add(p); Please guys help me. Thanks in advance.. 回答1: You need a Chunk to do that: Font f = new Font

How to use a custom font style in flutter?

淺唱寂寞╮ 提交于 2020-01-21 04:38:08
问题 I have already set on my pubspec.yaml the following code: fonts: - family: Roboto fonts: - asset: fonts/Roboto-Light.ttf - asset: fonts/Roboto-Thin.ttf - asset: fonts/Roboto-Italic.ttf But I don't know to use, for example, the style "Roboto-Light.ttf" from Roboto in my widget. I tried this: new ListTile( title: new Text( "Home", style: new TextStyle( fontFamily: "Roboto", fontSize: 60.0, ), ), ), I don't know how to access the style "Roboto-Light.ttf". How to do this? Thanks! 回答1: Roboto is

Determining exact glyph height in specified font

倾然丶 夕夏残阳落幕 提交于 2020-01-21 01:36:26
问题 I have searched a lot and tried much but I can not find the proper solution. I wonder is there any approach for determining exact glyph height in specified font? I mean here when I want to determine the height of DOT glyph I should receive small height but not height with paddings or the font size. I have found the solution for determining exact glyph width here (I have used the second approach) but it does not work for height. UPDATE: I need solution for .NET 1.1 回答1: It's not that hard to

C# console font

可紊 提交于 2020-01-20 08:32:12
问题 I cannot find out which font the console app uses by default? Is it guaranteed that everyone has that font (when running this .NET app)? Want to display some unicode chars and need to be sure they are present within that font. Thanks 回答1: I strongly recommend avoiding the Console if you want to use Unicode characters. There are many issues with trying to get the Console to display Unicode correctly. Unicode is not directly supported in Console output. The best option is typically to set the

Corrupt TrueType Font Detection

我是研究僧i 提交于 2020-01-20 04:14:04
问题 I am at present dealing with a corrupt TrueType font. Programs available to me tell me there is a problem with the maxp table -- the maxContours member has a value that is too large. Is there a sure-fire way to detect when a maxContours value is too high or too low (yes that too can be a problem)? (Fonts are programs so one way to detect a font file is good is to execute them, but this is not an acceptable solution for me.) I don't need a font library because I can't add one. I have already

Designing a Custom Font Dialog/Selector for C# that filters out non true type fonts

别等时光非礼了梦想. 提交于 2020-01-19 06:12:06
问题 Since the inbuilt Font Dialog returns a 'Not a True Type Font' Exception on selecting a Non True Type Font, I'm trying to create a Custom Font Dialog using Font-families which filter out non true type fonts. The Control is working perfectly but I need a size and style selectors for this dialog. I'm posting the current code. Please help me add a size and a style selector to this. It could also be useful to you. public class FontListBox : ListBox { private List<Font> _fonts = new List<Font>();

Is @font-face usable now?

霸气de小男生 提交于 2020-01-19 04:48:45
问题 I have to use a fancy font in a project but I'd really like to avoid sifr and other ugly alternatives so I'm looking at @font-face. However, I'm really confused with several blog/sites offering different views on its usability. Is is ready yet? Which browsers support it today? Thanks 回答1: Just about every browser implements it now. The only real catch is that Internet Explorer requires font files in its own OTF format and will not understand TTF format. Many sites that provide fonts for use