fonts

Adding fonts to Apache Pdfbox?

只愿长相守 提交于 2021-02-07 11:57:37
问题 Is there a way to add additional font styles into Apache Pdfbox? We're currently trying to work around printing PDFs in our system (currently being done with PDF-Renderer.) I have been looking at various alternatives (pdfbox, jpedal, jPDFPrint) Our hope is for a free GPL compatible library to use, and as such we're leaning towards pdfbox. I have been able to write some sample code to print out the pdf which 'works'. See below: PDDocument doc; try { doc = PDDocument.load("test.pdf"); doc.print

Import font into React application

六眼飞鱼酱① 提交于 2021-02-07 11:55:14
问题 I'm trying to use the Roboto font in my app and having tough time.. I did npm install --save typeface-roboto and added import 'typeface-roboto' to my React component. But still can't get my font to change. I am trying to do like this : const React = require('react') import 'typeface-roboto' class Example extends React.Component { render() { let styles = { root: { fontFamily: 'Roboto' } } return ( <div style={styles.root}> <p> This text is still not Roboto ?!???!!1 </p> </div> ) } } module

How to specify the system’s default serif and sans-serif font-family?

别等时光非礼了梦想. 提交于 2021-02-07 09:45:50
问题 When I learned CSS over a decade ago, the standard (and only) way to use the "default fonts" (whatever that means) was: font-family: serif; font-family: sans-serif; Then, last year, Apple added a custom syntax for their new system font, and Blink did something similar if I remember correctly. Can someone who's more up-to-date with CSS summarize how my font-family property should look like when I just want the default sans-serif or serif font? (I specifically don't want webfonts.) 回答1: The CSS

How to specify the system’s default serif and sans-serif font-family?

戏子无情 提交于 2021-02-07 09:43:02
问题 When I learned CSS over a decade ago, the standard (and only) way to use the "default fonts" (whatever that means) was: font-family: serif; font-family: sans-serif; Then, last year, Apple added a custom syntax for their new system font, and Blink did something similar if I remember correctly. Can someone who's more up-to-date with CSS summarize how my font-family property should look like when I just want the default sans-serif or serif font? (I specifically don't want webfonts.) 回答1: The CSS

How does DirectWrite (CreateTextFormat) pick the fallback font(s)?

馋奶兔 提交于 2021-02-07 08:27:00
问题 The documentation for CreateTextFormat says nothing about font fallback selection, but if the default (NULL = system) collection is chosen, then DirectWrite clearly implements font fallback. For example, if I add two glyphs not found in the Gabriola font to the test string used by the DirectWrite SDK demo app, then DirectWrite picks the missing glyphs from the Segoe UI Symbol font. This happens with the basic DrawText call and also with a custom renderer (that does nothing custom for font

Install fonts to PC using Inno Setup

社会主义新天地 提交于 2021-02-07 08:01:48
问题 I created a Windows application and that uses a particular font. So I need to install that font to the users system using Inno Setup. I used this code: Source: "ARLRDBD.TTF"; DestDir: "{fonts}"; FontInstall: "Oz Handicraft BT"; \ Flags: onlyifdoesntexist uninsneveruninstall But this code had no effect when I tested it in my system. How can I do it perfectly? 回答1: FontInstall - This must be exactly the same name as you see when you double-click the font file in Explorer. In your case you have

Install fonts to PC using Inno Setup

流过昼夜 提交于 2021-02-07 07:58:20
问题 I created a Windows application and that uses a particular font. So I need to install that font to the users system using Inno Setup. I used this code: Source: "ARLRDBD.TTF"; DestDir: "{fonts}"; FontInstall: "Oz Handicraft BT"; \ Flags: onlyifdoesntexist uninsneveruninstall But this code had no effect when I tested it in my system. How can I do it perfectly? 回答1: FontInstall - This must be exactly the same name as you see when you double-click the font file in Explorer. In your case you have

WPF - Load Font from Stream?

随声附和 提交于 2021-02-05 21:21:34
问题 I have a MemoryStream with the contents of a Font File (.ttf) and I would like to be able to create a FontFamily WPF object from that stream WITHOUT writing the contents of the stream to disk. I know this is possible with a System.Drawing.FontFamily but I cannot find out how to do it with System.Windows.Media.FontFamily. Note: I will only have the stream, so I can't pack it as a resource in the application and because of disk permissions issues, will not be able to write the font file to disk

How to use user defined font on Forge design automation with AutoCAD Plot API

痴心易碎 提交于 2021-02-05 09:34:26
问题 We are using the Forge Plot API to plot DWGs to PDF/JPG. A customer came up with DWGs that are using a special TTF-Font called ROBBI.TTF. I suppose this font has to be uploaded to the Forge server before it can be used. Is it possible to upload the font once, so that it can be used for all our plot jobs? If not: What is the best way to plot using a custom TTF font? 回答1: Thomas, yes, you can wrap custom fonts in your apppackage bundle under Contents folder and refer the path to SupportPath

How to find out which font can display these characters?

拥有回忆 提交于 2021-02-05 08:32:15
问题 ⚫⚪ Unicode U+26AB Unicode U+26AA This two characters can be display in terminal, I want use convert (imagemagick command) to convert those text into picture. But convert only can use one special font , not fallback font could be used. convert -list font So how can I find which font could display those characters? 回答1: I adapted the code in this answer, to make a script to find which font contains a particular character as follows: #!/usr/bin/env python3 import os, sys import unicodedata from