fonts

Navigation Controller Error

≡放荡痞女 提交于 2019-12-25 00:23:06
问题 I have a navigation controller and I want the title to have a custom font. I have tried to do this but when it runs I get Thread 1: EXC_BAD_INSTRUCTION (code=EXC_1386_INVOP.subcode=0x0) Here is my code. import UIKit class PriceCheckSpreadsheetViewController: UIViewController { @IBOutlet weak var SpreadsheetView: UIWebView! @IBOutlet weak var Loading: UIActivityIndicatorView! @IBOutlet weak var BackButton: UIBarButtonItem! @IBOutlet weak var ForwardButton: UIBarButtonItem! @IBOutlet weak var

Render php image with own font

。_饼干妹妹 提交于 2019-12-25 00:03:13
问题 I want to use a own font (True Type) in this code: <?php header("Content-type: image/png"); // Email adres renderen $email = "mail@mail.nl"; $length = (strlen($email)*8); $im = @ImageCreate ($length, 20) or die ("Kan geen nieuwe afbeelding genereren"); $background_color = ImageColorAllocate ($im, 53, 88, 121); // Container BG: 53,88,121 $text_color = ImageColorAllocate ($im, 194, 212, 229); imagestring($im, 3,5,2,$email, $text_color); imagepng ($im); ?> How can i change the font in: Open Sans

Issue in the Assets folder

你说的曾经没有我的故事 提交于 2019-12-24 23:58:04
问题 I had an issue where a font didnt work and it gave me a FC. So I put the font file into the sdcard, and used CreateFromFile in the typeface and the font worked! Here is the code I used for the Assets folder: holder.tv_SuraName =(TextView)convertView.findViewById(R.id.Start_Name); holder.tv_SuraName.setTypeface(Typeface.createFromAsset(mContext.getAssets(), "suralist_font.ttf")); But I changed the code to this and it worked: holder.tv_SuraName = (TextView)convertView.findViewById(R.id.Start

What is the iText 7 equivalent of FontSelector.Process?

蓝咒 提交于 2019-12-24 23:42:49
问题 I'm beginning the process of updating code written against iText5 to work with iText7. Is there a similar mechanism in iText7 to the FontSelector class, where you would load up fonts and the "Process" action would automatically determine which font to use (and return a formatted pdf "chunk" that could be added to the document)? Here's the code snippet (this is C++, but my "native" language is C#, so feel free to answer with C#). try { doc = gcnew Document(); pdfWriter = PdfWriter::GetInstance

Flex 4.6: embedded fonts not applied to TextField

社会主义新天地 提交于 2019-12-24 22:43:45
问题 I am trying to use embedded fonts (Flex 4.6) in a UITextField. As long as I use a font that is registered with Windows, it works fine, but for a font not registered, the UITextField defaults to TimesRoman (or something similar) Note that when I check to see if the font is embedded, it returns True (FlexGlobals.topLevelApplication.systemManager.isFontFaceEmbedded(txtFormatCoda)) So what am I missing? In the code below, if I add the font Kredit to Windows Font, the UI text field appears in

jsPDF with non-latin fonts

这一生的挚爱 提交于 2019-12-24 22:42:51
问题 I want to create pdf from javascript. For this I use jsPDF I want to use cyrillic fonts. I create js-file that contents font Roboto-regular by recommendations in docs. And I try get pdf with cyrillic font. But unfortunately. This is my code. How I must use js-file that contents font? function doPdf() { var pdf = new jsPDF('l', 'pt', 'letter'); pdf.setFont('Roboto-Regular', 'normal'); pdf.html(document.body, { callback: function(pdf) { var iframe = document.createElement('iframe'); iframe

WPF Can't Find some Fonts

别来无恙 提交于 2019-12-24 21:22:35
问题 Why is it that Media.Fonts can't find "Arial Rounded MT Bold" ? foreach (var f in System.Windows.Media.Fonts.SystemFontFamilies) { if (f.Source == "Arial Rounded MT Bold") { var x = "Not Found"; } } var fc = new System.Drawing.Text.InstalledFontCollection(); foreach (var fd in fc.Families) { if (fd.Name == "Arial Rounded MT Bold") { var x = "Found"; } } 回答1: Check in your system's Windows folder. Do u have "Arial Rounded MT Bold" font installed on your system?? You might not have the font

DirectX Font tutorial that doesn't use GDI

亡梦爱人 提交于 2019-12-24 21:18:03
问题 Does anyone have any tutorials/info for creating and rendering fonts in native directx 9 that doesn't use GDI? (eg doesn't use ID3DXFont). I'm reading that this isn't the best solution (due to accessing GDI) but what is the 'right' way to render fonts in dx? 回答1: ID3DXFont is a great thing for easy to use, early, debug output. However, it does use the GDI for font rasterization (not hardware accelerated) and there is a significant performance hit (try it, its actually very noticable). As of

get path from <input type=“file”/>

折月煮酒 提交于 2019-12-24 21:09:06
问题 I am using <input type="file" id="uploadFont" value="Upload Font"/> to upload a font to my application. The open file dialog opens up and I choose the font. How can I get the path of the choosen font. 回答1: This is browser-dependant, but on modern secure browsers you can't - and this is a good thing. If you were able to read this path, an attacker would also be able to, which is a huge information leak - for example it mostly gives him your username, if you chose a file from e.g. "My Documents

osx initial login screen shows only questionmarks

陌路散爱 提交于 2019-12-24 21:03:56
问题 I did a upgrade from macOS el capitano to high sierra . After the upgrade, the inital login screen, where you enter your password, shows the icons of my profiles and then questionmarks instead of letters. I can login and from that point everything is normal. If I lock the screen, the login screen is normal again, as usual. What I did already to get rid of the error: ontrestore default and sudo atsutil databases -remove recommended form login screen characters all question marks login info