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

Fix segfault in vpFont #1562

Merged
merged 3 commits into from
Jan 31, 2025
Merged

Conversation

s-trinh
Copy link
Contributor

@s-trinh s-trinh commented Jan 25, 2025

Before the following code produces a segfault due to a bad computation of the bottom text bb:

std::ostringstream oss;
oss << "Computation time: " << std::fixed << std::setprecision(2) << 10.5168 << " ms/";

vpFont font(20, vpFont::TRUETYPE_FILE);
vpImage<vpRGBa> I(32, 256);
font.drawText(I, oss.str(), vpImagePoint(10, 10), vpColor::red);

@s-trinh s-trinh marked this pull request as ready for review January 25, 2025 22:38
Copy link

codecov bot commented Jan 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.56%. Comparing base (917cd82) to head (96cae06).
Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1562      +/-   ##
==========================================
+ Coverage   54.39%   54.56%   +0.17%     
==========================================
  Files         442      442              
  Lines       53468    53469       +1     
==========================================
+ Hits        29083    29177      +94     
+ Misses      24385    24292      -93     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@s-trinh s-trinh force-pushed the fix_draw_text_vpFont_segfault branch from b7cd58b to 96cae06 Compare January 26, 2025 13:36
@fspindle
Copy link
Contributor

@s-trinh Thanks

@fspindle fspindle merged commit cc0406e into lagadic:master Jan 31, 2025
84 of 90 checks passed
fspindle added a commit to fspindle/visp that referenced this pull request Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants