Fixed a "choose" line thickness issue.
Mac actually draws a line of zero width.
This commit is contained in:
@@ -369,11 +369,14 @@ class MTFractionDisplay : MTDisplay {
|
||||
self.textColor?.setStroke()
|
||||
|
||||
// draw the horizontal line
|
||||
let path = MTBezierPath()
|
||||
path.move(to: CGPointMake(self.position.x, self.position.y + self.linePosition))
|
||||
path.addLine(to: CGPointMake(self.position.x + self.width, self.position.y + self.linePosition))
|
||||
path.lineWidth = self.lineThickness
|
||||
path.stroke()
|
||||
// Note: line thickness of 0 draws the thinnest possible line - we want no line so check for 0s
|
||||
if self.lineThickness > 0 {
|
||||
let path = MTBezierPath()
|
||||
path.move(to: CGPointMake(self.position.x, self.position.y + self.linePosition))
|
||||
path.addLine(to: CGPointMake(self.position.x + self.width, self.position.y + self.linePosition))
|
||||
path.lineWidth = self.lineThickness
|
||||
path.stroke()
|
||||
}
|
||||
|
||||
context.restoreGState()
|
||||
}
|
||||
|
||||
@@ -962,7 +962,7 @@ class MTTypesetter {
|
||||
var numeratorShiftUp = self.numeratorShiftUp(frac!.hasRule)
|
||||
var denominatorShiftDown = self.denominatorShiftDown(frac!.hasRule)
|
||||
let barLocation = styleFont.mathTable!.axisHeight
|
||||
let barThickness = frac!.hasRule ? styleFont.mathTable!.fractionRuleThickness : 0;
|
||||
let barThickness = frac!.hasRule ? styleFont.mathTable!.fractionRuleThickness : 0
|
||||
|
||||
if frac!.hasRule {
|
||||
// This is the difference between the lowest edge of the numerator and the top edge of the fraction bar
|
||||
|
||||
Reference in New Issue
Block a user