+ int underlineStyle = GetFont().GetUnderlined() ? NSUnderlineStyleSingle : NSUnderlineStyleNone;
+ NSRange lineGlyphRange;
+ NSRect lineRect = [sm_cocoaNSLayoutManager lineFragmentRectForGlyphAtIndex:0 effectiveRange:&lineGlyphRange];
+
+ [sm_cocoaNSLayoutManager underlineGlyphRange:glyphRange underlineType:underlineStyle
+ lineFragmentRect:lineRect lineFragmentGlyphRange:lineGlyphRange
+ containerOrigin:underlineLocation];
+