fonts

Using Arial Unicode MS BOLD in JavaFX

江枫思渺然 提交于 2021-01-28 07:54:43
问题 I want to use the font Arial Unicode MS in my JavaFX project which works fine. But i want e.g. the headlines to be bold. But I don't get the bold font working. What's the probleme here? I tried it with css and within the code directly .bold-font { -fx-font-family: Arial Unicode MS; -fx-font-weight: bold; } and label.setFont( Font.font("Arial Unicode MS", FontWeight.BOLD,24)); Nothing worked and when i check the font after setting with "getFont()" it is still regular. 回答1: i checked few

SwiftUI: How to get .serif (New York) font in NavBarTitle

不想你离开。 提交于 2021-01-28 07:50:47
问题 is there any simple solution on how to use Apples New York font within the navigationBarTitle? I tried the following, but without success: .navigationBarTitle(Text("TestTitle").font(.system(.largeTitle, design: .serif))) It just defaults back to the default SF font. Any help is greatly appeciated! Thanks! 回答1: Here is a demo of possible solution. Tested with Xcode 12 / iOS 14 init() { UINavigationBar.appearance().largeTitleTextAttributes = [.font: UIFont(descriptor: UIFontDescriptor

SwiftUI Font smallCaps() not working with italic()

时光总嘲笑我的痴心妄想 提交于 2021-01-28 05:22:26
问题 extension Font { public static let Heading1: Font = system(size: 34, weight: .black, design: .default) .smallCaps() .italic() } I can make the font all caps OR italic - but not both. Anybody know how to get around this? Without typing the String out in caps to begin with. I even tried importing BlackItalic as a custom font and still had the same issue. 回答1: None of Apple platform built-in font support both italic-smallcap features combination. System San Francisco is the most font-feature

Uninstall fonts installed using SWT's Display.loadFont API

筅森魡賤 提交于 2021-01-28 05:21:42
问题 I am working under eclipse plugin and trying to load fonts into the application as resources, so they will appear in project explorer tree. In SWT we have method loadFont of Display class which loads font from specified file, so it will appear in list of available fonts of application. I am using this method. But when I am trying to delete the font from project explorer I am getting following exception: org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting

Python: Matplotlib: how to print ONE text with different sizes in it?

ぐ巨炮叔叔 提交于 2021-01-28 05:06:05
问题 is it possible in matplotlib to have a textbox with different font sizes within one string? Thanks for help 回答1: I don't think this can be done without using the LaTeX text renderer. To use this do, from matplotlib import rcParams rcParams['text.usetex'] = True Then you can print multi-fontsize strings using standard LaTeX syntax, e.g. from matplotlib import pyplot as plt ax = plt.axes() ax.text(0.5, 0.5, r'{\tiny tiny text} normal text {\Huge HUGE TEXT}') Sometimes the LaTeX font renderer

Python: Matplotlib: how to print ONE text with different sizes in it?

早过忘川 提交于 2021-01-28 05:04:34
问题 is it possible in matplotlib to have a textbox with different font sizes within one string? Thanks for help 回答1: I don't think this can be done without using the LaTeX text renderer. To use this do, from matplotlib import rcParams rcParams['text.usetex'] = True Then you can print multi-fontsize strings using standard LaTeX syntax, e.g. from matplotlib import pyplot as plt ax = plt.axes() ax.text(0.5, 0.5, r'{\tiny tiny text} normal text {\Huge HUGE TEXT}') Sometimes the LaTeX font renderer

Matplotllib and Xelatex

时光毁灭记忆、已成空白 提交于 2021-01-28 04:31:06
问题 I tried to find the answer for my question for some time now but could not come up with something that works for me. My question is: How can you use Xelatex to compile text in Matplotlib? I know that there is this page: http://matplotlib.org/users/pgf.html However, I could not come up with something that would work. What I got up to now: import matplotlib as mpl mpl.use("pgf") ## TeX preamble preamble = """ \usepackage{fontspec} \setmainfont{Linux Libertine O} """ params = {"text.usetex":

How to use my own bitmap font in PIL.ImageFont?

六月ゝ 毕业季﹏ 提交于 2021-01-28 02:03:50
问题 I created a bitmap font, basically a 256x256 png image where each character occupies 8x8 tile. I want to use it with Pillow as ImageFont but there's no info on this in Pillow docs. It says I can load bitmap fonts like this font = ImageFont.load("arial.pil") but "PIL uses its own font file format to store bitmap fonts." so I guess png file won't work. How can I tell PIL to use said bitmap and where each character is on it? 回答1: Not a complete answer, but too much for a comment, and it may be

Javascript: create font from blob data

元气小坏坏 提交于 2021-01-28 00:34:30
问题 I'm trying to create an assets loader based on XMLHttpRequest only. I'm loading images with the help of XMLHttpRequest, getting it's responce of "blob" type and converting it to a normal html element. Something like this: var request = new XMLHttpRequest(); var image; var blob; request.onreadystatechange= function() { if (request.readyState === 4) { if (request.status === 200) { blob = request.response; image = new Image(); image.src = window.URL.createObjectURL(blob); } } }; request

How to tell if my YEN symbol is a backslash or a YEN?

萝らか妹 提交于 2021-01-27 19:14:02
问题 I have a little program which is used to print the backslash symbol to the PDF file. In most English OS a backslash is displayed as a backslash, and my program works just fine. However, in Japanese OS or Korean OS my program starts to have problem. In those OS, a backslash is displayed as a YEN or WON symbol, but my program exports them as a backslash. I know that this is a bug of the font which has been around but i still want to find a solution for it. Does anyone know how to tell if my