fonts

Use a custom font within shinyapps.io?

删除回忆录丶 提交于 2020-07-10 03:12:49
问题 I have the following code (placed at the top of my app.R file, just after my library() calls): dir.create('r-lib') download.file('https://cran.r-project.org/src/contrib/extrafontdb_1.0.tar.gz','r-lib/extrafontdb_1.0.tar.gz') .libPaths(c('r-lib', .libPaths())) install.packages('r-lib/extrafontdb_1.0.tar.gz',type = 'source',repos = NULL) dir.create('~/.fonts') download.file("https://github.com/** GIT USER NAME **/fonts/archive/master/fonts.zip", destfile = "fonts.zip") unzip("fonts.zip", exdir

Qt: change font weight

[亡魂溺海] 提交于 2020-07-06 12:59:12
问题 I would like to have my text in QLabel somewhere between bold and normal style and I believe that setting font-weight should be the answer to my problem. In Qt documentation, I have found out that there are two options how to change font-weight: From cpp side via: QFont::setWeight() method which accepts numbers 0-99 http://doc.qt.io/qt-4.8/qfont.html#Weight-enum From Qss style via: font-weight attribute, which accepts numbers 100,200,...,900 http://doc.qt.io/qt-4.8/stylesheet-reference.html

Matplotlib rcParams not recognizing “Times New Roman” (mac High Sierra)

左心房为你撑大大i 提交于 2020-07-06 04:03:13
问题 I am trying to set the font of a matplotlib plot to Times New Roman. I have tried: import matplotlib.pyplot as plt plt.rcParams['font.family'] = 'Times New Roman' I believe this is the correct way to set the font, but I keep getting this error that the found is not found: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py:1238: UserWarning: findfont: Font family ['Times New Roman'] not found. Falling back to DejaVu Sans. After some

nuxt.js - preload .woff fonts loaded as @font-face

邮差的信 提交于 2020-07-05 09:45:06
问题 Trying to improve my google score and google is telling me to use preload on the two custom fonts i'm using to save a whopping 4.5 seconds? currently the fonts are stored in assets/fonts and then being loaded as @font-face in typography.scss file when is then loaded in the nuxt.config.js file inside css: [ '@/assets/scss/typography.scss', ] 回答1: So I guess you are asking how to preload a font? There is a way to call a render function in nuxt.config.js that will preload fonts, and scripts and

How do I add a Google Font to a VueJS Component?

送分小仙女□ 提交于 2020-07-04 08:28:09
问题 I've been trying for an hour to find a way to import a Google Font into a VueJS Component, but I cannot seem to find a solution, nothing worked yet, not even the stuff from previous StackOverflow questions. All the answers I've found are 1.5 to 2 years old now. I would appreciate it greatly if someone could suggest an up to date solution. I am using VueJS2 + Webpack + Vue-cli 回答1: The fastest way is to import the font in a CSS file, for example App.css , if all components should have it:

Extracting Glyph Kerning Information C++

依然范特西╮ 提交于 2020-06-26 07:58:20
问题 After asking my previous question about Uniscribe glyph kerning, and not yet receiving an answer, plus further reading on google etc, it seems Uniscribe may not support extracting glyph kerning information from a font. I therefore have a simple followup question - are there any good examples (preferably with some C++ code) of extracting glyph kerning information for a specified string from a font? It's mentioned in various places that either Pango, QT or ICU are capable of doing this, but

Extracting Glyph Kerning Information C++

不羁的心 提交于 2020-06-26 07:58:02
问题 After asking my previous question about Uniscribe glyph kerning, and not yet receiving an answer, plus further reading on google etc, it seems Uniscribe may not support extracting glyph kerning information from a font. I therefore have a simple followup question - are there any good examples (preferably with some C++ code) of extracting glyph kerning information for a specified string from a font? It's mentioned in various places that either Pango, QT or ICU are capable of doing this, but

How to upload custom font and use it in angular 6 dynamically

怎甘沉沦 提交于 2020-06-26 04:02:58
问题 I am working in angular 6 project and I need to to give functionality of user uploaded font and use it. I have also try below code : var junction_font = new FontFace('example_font_family', 'url(https://fonts.gstatic.com/s/gloriahallelujah/v9/LYjYdHv3kUk9BMV96EIswT9DIbW-MIS11zM.woff2)'); junction_font.load().then(function (loaded_face) { document.fonts.add(loaded_face); }).catch(function (error) { console.log('error : ', error); }); HTML: <p style="example_font_family">Lorem Ipsum</p> But this

How to upload custom font and use it in angular 6 dynamically

依然范特西╮ 提交于 2020-06-26 04:00:24
问题 I am working in angular 6 project and I need to to give functionality of user uploaded font and use it. I have also try below code : var junction_font = new FontFace('example_font_family', 'url(https://fonts.gstatic.com/s/gloriahallelujah/v9/LYjYdHv3kUk9BMV96EIswT9DIbW-MIS11zM.woff2)'); junction_font.load().then(function (loaded_face) { document.fonts.add(loaded_face); }).catch(function (error) { console.log('error : ', error); }); HTML: <p style="example_font_family">Lorem Ipsum</p> But this

Qt fonts have different sizes on different systems

北战南征 提交于 2020-06-25 21:13:15
问题 Using Qt Designer for the creation of ui-files, the following problem occurred: Opening the same ui-file on a different Linux system results in different displaying of the font sizes. So, the ui-files created on one system may have too large fonts, when opening them with Qt Designer on another system. This makes text unreadable in many cases. The "point size" of the widgets is the same on both systems, but in order to make it readable on both, I have to manually decrease the point size in Qt