Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HybridOS
hiSVG
Commits
90bf7ba7
Commit
90bf7ba7
authored
May 10, 2021
by
XueShuming
Browse files
remove hisvg_font_map_get_default
parent
9f59bfcf
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/hisvg-text-helper.h
View file @
90bf7ba7
...
...
@@ -158,8 +158,7 @@ typedef struct _PangoAttrList HiSVGTextAttrList;
typedef
struct
_PangoAttribute
HiSVGTextAttribute
;
HiSVGFontMap
*
hisvg_font_map_get_default
();
HiSVGTextContext
*
hisvg_create_text_context
(
HiSVGFontMap
*
fontmap
);
HiSVGTextContext
*
hisvg_create_text_context
();
void
hisvg_text_context_set_resolution
(
HiSVGTextContext
*
context
,
double
dpi
);
HiSVGTextGravity
hisvg_text_context_get_gravity
(
HiSVGTextContext
*
context
);
HiSVGTextLanguage
*
hisvg_text_language_from_string
(
const
char
*
language
);
...
...
src/hisvg-cairo-draw.c
View file @
90bf7ba7
...
...
@@ -392,12 +392,10 @@ _set_hisvg_affine (HiSVGCairoRender * render, cairo_matrix_t *affine)
void
*
hisvg_cairo_create_text_context
(
HiSVGDrawingCtx
*
ctx
)
{
HiSVGFontMap
*
fontmap
;
HiSVGTextContext
*
context
;
HiSVGCairoRender
*
render
=
HISVG_CAIRO_RENDER
(
ctx
->
render
);
fontmap
=
hisvg_font_map_get_default
();
context
=
hisvg_create_text_context
(
fontmap
);
context
=
hisvg_create_text_context
();
hisvg_cairo_update_text_context
(
render
->
cr
,
context
);
hisvg_text_context_set_resolution
(
context
,
ctx
->
dpi_y
);
return
context
;
...
...
src/hisvg-text-helper.c
View file @
90bf7ba7
...
...
@@ -53,14 +53,9 @@ typedef struct _PangoContext HiSVGTextContext;
typedef
struct
_PangoLayout
HiSVGTextContextLayout
;
typedef
struct
_PangoRectangle
HiSVGTextRectangle
;
HiSVG
FontMap
*
hisvg_font_map_get_defaul
t
()
HiSVG
TextContext
*
hisvg_create_text_contex
t
()
{
return
pango_cairo_font_map_get_default
();
}
HiSVGTextContext
*
hisvg_create_text_context
(
HiSVGFontMap
*
fontmap
)
{
return
pango_font_map_create_context
(
fontmap
);
return
pango_font_map_create_context
(
pango_cairo_font_map_get_default
());
}
void
hisvg_text_context_set_resolution
(
HiSVGTextContext
*
context
,
double
dpi
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment