Skip to content

Commit 801d23a

Browse files
committed
Font: add some documentation comments to Font
This adds some doc comments for `Font.Weight` and `Font.TextStyle`.
1 parent 322b318 commit 801d23a

File tree

1 file changed

+20
-0
lines changed
  • Sources/SwiftWin32/Text Display and Fonts

1 file changed

+20
-0
lines changed

Sources/SwiftWin32/Text Display and Fonts/Font.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,38 +557,47 @@ public extension Font {
557557
}
558558

559559
public extension Font.Weight {
560+
/// The ultra-light font weight.
560561
static var ultraLight: Font.Weight {
561562
Font.Weight(rawValue: FW_ULTRALIGHT)
562563
}
563564

565+
/// The thin font weight.
564566
static var thin: Font.Weight {
565567
Font.Weight(rawValue: FW_THIN)
566568
}
567569

570+
/// The light font weight.
568571
static var light: Font.Weight {
569572
Font.Weight(rawValue: FW_LIGHT)
570573
}
571574

575+
/// The regular font weight.
572576
static var regular: Font.Weight {
573577
Font.Weight(rawValue: FW_REGULAR)
574578
}
575579

580+
/// The medium font weight.
576581
static var medium: Font.Weight {
577582
Font.Weight(rawValue: FW_MEDIUM)
578583
}
579584

585+
/// The semibold font weight.
580586
static var semibold: Font.Weight {
581587
Font.Weight(rawValue: FW_SEMIBOLD)
582588
}
583589

590+
/// The bold font weight.
584591
static var bold: Font.Weight {
585592
Font.Weight(rawValue: FW_BOLD)
586593
}
587594

595+
/// The heavy font weight.
588596
static var heavy: Font.Weight {
589597
Font.Weight(rawValue: FW_HEAVY)
590598
}
591599

600+
/// The black font weight.
592601
static var black: Font.Weight {
593602
Font.Weight(rawValue: FW_BLACK)
594603
}
@@ -606,46 +615,57 @@ public extension Font {
606615
}
607616

608617
public extension Font.TextStyle {
618+
/// The font for body text.
609619
static var body: Font.TextStyle {
610620
Font.TextStyle(rawValue: "UICTFontTextStyleBody")
611621
}
612622

623+
/// The font for callouts.
613624
static var callout: Font.TextStyle {
614625
Font.TextStyle(rawValue: "UICTFontTextStyleCallout")
615626
}
616627

628+
/// The font for standard captions.
617629
static var caption1: Font.TextStyle {
618630
Font.TextStyle(rawValue: "UICTFontTextStyleCaption1")
619631
}
620632

633+
/// The font for alternate captions.
621634
static var caption2: Font.TextStyle {
622635
Font.TextStyle(rawValue: "UICTFontTextStyleCaption2")
623636
}
624637

638+
/// The font for footnotes.
625639
static var footnote: Font.TextStyle {
626640
Font.TextStyle(rawValue: "UICTFontTextStyleFootnote")
627641
}
628642

643+
/// The font for headings.
629644
static var headline: Font.TextStyle {
630645
Font.TextStyle(rawValue: "UICTFontTextStyleHeadline")
631646
}
632647

648+
/// The font for subheadings.
633649
static var subheadline: Font.TextStyle {
634650
Font.TextStyle(rawValue: "UICTFontTextStyleSubhead")
635651
}
636652

653+
/// The font style for large titles.
637654
static var largeTitle: Font.TextStyle {
638655
Font.TextStyle(rawValue: "UICTFontTextStyleTitle0")
639656
}
640657

658+
/// The font for first-level hierarchical headings.
641659
static var title1: Font.TextStyle {
642660
Font.TextStyle(rawValue: "UICTFontTextStyleTitle1")
643661
}
644662

663+
/// The font for second-level hierarchical headings.
645664
static var title2: Font.TextStyle {
646665
Font.TextStyle(rawValue: "UICTFontTextStyleTitle2")
647666
}
648667

668+
/// The font for third-level hierarchical headings.
649669
static var title3: Font.TextStyle {
650670
Font.TextStyle(rawValue: "UICTFontTextStyleTitle3")
651671
}

0 commit comments

Comments
 (0)