Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lvfntman: tweak code to be forward compatible with freetype 2.13.3 #601

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions crengine/src/lvfntman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2670,13 +2670,11 @@ class LVFreeTypeFace : public LVFont
// Step 3. for bezier: Q control-point-x control-point-y, destination-x, destination-y
// for line: L x-coord, y-coord
// for move: M x-coord, y-coord
FT_Outline outline = _slot->outline;
FT_Vector* points = outline.points;
char* tags = outline.tags;
short* contours = outline.contours;
const FT_Outline * outline = &_slot->outline;
const FT_Vector * points = outline->points;
int contour_starti = 0;
for (int i = 0 ; i < outline.n_contours ; i++ ) {
int contour_endi = contours[i];
for (int i = 0 ; i < outline->n_contours ; i++ ) {
int contour_endi = outline->contours[i];
int offset = contour_starti;
int npts = contour_endi - contour_starti + 1;
SVGGlyphsCollector_svg_move_to(NULL, svg_collector, NULL, points[contour_starti].x, points[contour_starti].y, NULL);
Expand All @@ -2689,9 +2687,9 @@ class LVFreeTypeFace : public LVFont
long y = points[a].y;
long nx = points[nexti].x;
long ny = points[nexti].y;
bool this_tagbit1 = (tags[a] & 1);
bool next_tagbit1 = (tags[nexti] & 1);
bool nextnext_tagbit1 = (tags[ nextnexti ] & 1);
bool this_tagbit1 = (outline->tags[a] & 1);
bool next_tagbit1 = (outline->tags[nexti] & 1);
bool nextnext_tagbit1 = (outline->tags[ nextnexti ] & 1);
bool this_isctl = !this_tagbit1;
bool next_isctl = !next_tagbit1;
bool nextnext_isctl = !nextnext_tagbit1;
Expand Down
Loading