Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
gvtextlayout.c
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11/*
12 * textlayout engine wrapper
13 */
14
15#include "config.h"
16
17#include <common/const.h>
19#include <gvc/gvcint.h>
20#include <gvc/gvcproc.h>
21#include <stdbool.h>
22#include <stdio.h>
23
25{
27 gvplugin_installed_t *typeptr;
28
29 plugin = gvplugin_load(gvc, API_textlayout, "textlayout", NULL);
30 if (plugin) {
31 typeptr = plugin->typeptr;
32 gvc->textlayout.engine = typeptr->engine;
33 return GVRENDER_PLUGIN; /* FIXME - need more suitable success code */
34 }
35 return NO_SUPPORT;
36}
37
38bool gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath)
39{
41
42 if (gvte && gvte->textlayout)
43 return gvte->textlayout(span, fontpath);
44 return false;
45}
#define NO_SUPPORT
Definition const.h:147
#define GVRENDER_PLUGIN
Definition const.h:146
node NULL
Definition grammar.y:163
static GVC_t * gvc
Definition gv.cpp:23
gvplugin_available_t * gvplugin_load(GVC_t *gvc, api_t api, const char *type, FILE *debug)
Definition gvplugin.c:250
int gvtextlayout_select(GVC_t *gvc)
bool gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath)
Definition gvcint.h:80
gvplugin_active_textlayout_t textlayout
Definition gvcint.h:108
gvtextlayout_engine_t * engine
Definition gvcint.h:46
gvplugin_installed_t * typeptr
Definition gvcint.h:65
ingroup plugin_api
Definition gvplugin.h:35
bool(* textlayout)(textspan_t *span, char **fontpath)