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

Underline layout and rendering #480

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Clean up code a little

  • Loading branch information
Eric Atkinson
Eric Atkinson committed May 24, 2013
commit d4b837bba69df34c40ea8020be5ebc1327d67ada
@@ -57,8 +57,8 @@ pub impl<'self> DisplayItem {
let baseline_origin = Point2D(origin.x, origin.y + font.metrics.ascent);
font.draw_text_into_context(ctx, new_run, range, baseline_origin, color);
if(new_run.underline){
//TODO: Use the font metrics to properly position the underline bar
let width = self.d().bounds.size.width;
let offset = font.metrics.underline_offset;
let u_size = font.metrics.underline_size;
let u_bounds = Rect(
Point2D(baseline_origin.x, baseline_origin.y),
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.