pango

Loading a font from a file to pango?

流过昼夜 提交于 2021-02-20 11:23:28
问题 I have a code uses Cairo and Pango to create an image : #include<stdio.h> #include<cairo.h> #include<pango/pangocairo.h> #define IMAGE_WIDTH 650 #define IMAGE_HEIGHT 150 #define TEXT "HELLO WORLD" #define FONT "MizuFontAlphabet Normal 40" /* * $ gcc $(pkg-config pangocairo cairo --cflags --libs) file.c */ int main(int argc , char** argv) { cairo_surface_t *surface; cairo_t *cr; PangoLayout *layout; PangoFontDescription *desc; PangoRectangle extents; surface = cairo_image_surface_create(CAIRO

Loading a font from a file to pango?

纵饮孤独 提交于 2021-02-20 11:22:40
问题 I have a code uses Cairo and Pango to create an image : #include<stdio.h> #include<cairo.h> #include<pango/pangocairo.h> #define IMAGE_WIDTH 650 #define IMAGE_HEIGHT 150 #define TEXT "HELLO WORLD" #define FONT "MizuFontAlphabet Normal 40" /* * $ gcc $(pkg-config pangocairo cairo --cflags --libs) file.c */ int main(int argc , char** argv) { cairo_surface_t *surface; cairo_t *cr; PangoLayout *layout; PangoFontDescription *desc; PangoRectangle extents; surface = cairo_image_surface_create(CAIRO

Loading a font from a file to pango?

不羁岁月 提交于 2021-02-20 11:22:33
问题 I have a code uses Cairo and Pango to create an image : #include<stdio.h> #include<cairo.h> #include<pango/pangocairo.h> #define IMAGE_WIDTH 650 #define IMAGE_HEIGHT 150 #define TEXT "HELLO WORLD" #define FONT "MizuFontAlphabet Normal 40" /* * $ gcc $(pkg-config pangocairo cairo --cflags --libs) file.c */ int main(int argc , char** argv) { cairo_surface_t *surface; cairo_t *cr; PangoLayout *layout; PangoFontDescription *desc; PangoRectangle extents; surface = cairo_image_surface_create(CAIRO

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

Gnuplot PDF Terminal Exhibits Font Issues on Mac

泪湿孤枕 提交于 2020-06-24 22:31:10
问题 Out of the blue, my Gnuplot has started having issues with the pdfcairo terminal. The font in the produced PDF files is jammed as if the width of the individual characters was set to zero. I am using Gnuplot 5.2.7 on Mac OS, installed via homebrew. Here, a minimal not-working example: reset set terminal pdfcairo set output "mnwe.pdf" set xlabel "Time t" set ylabel "sin(t)" plot [0:2*pi] sin(x) with lines notitle which produces the following output: I suspect that the font issue occurred after

Gnuplot PDF Terminal Exhibits Font Issues on Mac

99封情书 提交于 2020-06-24 22:29:07
问题 Out of the blue, my Gnuplot has started having issues with the pdfcairo terminal. The font in the produced PDF files is jammed as if the width of the individual characters was set to zero. I am using Gnuplot 5.2.7 on Mac OS, installed via homebrew. Here, a minimal not-working example: reset set terminal pdfcairo set output "mnwe.pdf" set xlabel "Time t" set ylabel "sin(t)" plot [0:2*pi] sin(x) with lines notitle which produces the following output: I suspect that the font issue occurred after

How to set font from file in Pango and Mono

你说的曾经没有我的故事 提交于 2020-06-16 03:03:13
问题 I have simple application that prints text and determines its size in pixels. static void Main(string[] args) { Application.Init(); var screen = Screen.Default; var layout = new Pango.Layout(PangoHelper.ContextGetForScreen(screen)); layout.FontDescription = new FontDescription(); layout.FontDescription.Family = "Times New Roman"; layout.FontDescription.Size = Units.FromPixels(18); layout.SetText("My Text"); int width; int height; layout.GetPixelSize(out width, out height); Console.WriteLine("

How to fix degree symbol not showing correctly in R on Linux/Fedora 31

久未见 提交于 2020-03-22 04:30:13
问题 This bounty has ended . Answers to this question are eligible for a +50 reputation bounty. Bounty grace period ends in 19 hours . giocomai wants to draw more attention to this question. Any map I make with: ggplot() + geom_sf() produces the expected map, but does not show the degree sign correctly, as appears from the following picture. The answer given in this answer on SO - degree symbol incorrect in map axis labels - does not help, and I am posting a separate question as I see a different

How to fix degree symbol not showing correctly in R on Linux/Fedora 31

流过昼夜 提交于 2020-03-22 04:29:22
问题 This bounty has ended . Answers to this question are eligible for a +50 reputation bounty. Bounty grace period ends in 19 hours . giocomai wants to draw more attention to this question. Any map I make with: ggplot() + geom_sf() produces the expected map, but does not show the degree sign correctly, as appears from the following picture. The answer given in this answer on SO - degree symbol incorrect in map axis labels - does not help, and I am posting a separate question as I see a different