pt — what it is, Points and scaling in iOS

Author: IT Sectr Published: 2026-02-25 Reading time: 8 min

pt — points, a logical unit of measurement in iOS and macOS that abstracts the interface from the physical screen resolution. One point corresponds to one pixel on a non-Retina screen (@1x) and two or three pixels on Retina (@2x, @3x). This article explains how pt works, scaling on different screens, and the use of CGPoint and UIFont.pointSize.

Key takeaways

  • pt — a logical iOS point, independent of the physical screen resolution
  • @1x, @2x, @3x — scale factor determining how many pixels correspond to one point
  • CGPoint — a structure for coordinates in pt, the foundation of all positioning operations
  • UIFont.pointSize — font size in points, always returned in pt
  • Screen distance: iPhone 15 Pro — 1 pt = 3 px at 460 PPI pixel density

What is pt in iOS?

pt (point) — a logical unit of measurement in iOS that allows developers to describe the interface in abstract coordinates, independent of the physical display resolution. Apple introduced the concept of points with the release of the iPhone 4 and Retina display in 2010. Before Retina, developers used pixels directly — one UI pixel equaled one physical pixel.

The iOS coordinate system is built on points: point (0,0) is in the upper-left corner of the screen, the X axis goes right, the Y axis goes down. The screen size in points remains constant for each device class: iPhone SE — 375×667 pt, iPhone 15 Pro — 393×852 pt, iPad — 768×1024 pt (portrait), 1024×768 pt (landscape). Physical resolution can be 1179×2556 px (iPhone 15 Pro) — but the developer works with points.

According to the Apple Human Interface Guidelines, points are the fundamental abstraction of UIKit. All frameworks — UIKit, SwiftUI, Core Graphics, SpriteKit — operate in points. Conversion to pixels occurs automatically at the rendering stage via UIScreen.nativeScale.

Scale factors: @1x, @2x, @3x

The scale factor determines how many physical pixels correspond to one logical point. Apple uses three levels: @1x — 1 pt = 1 px (iPad mini without Retina, older models), @2x — 1 pt = 2 px (most iPhones before 2020, iPad Retina), @3x — 1 pt = 3 px (iPhone X and newer, including iPhone 15 Pro).

DeviceSize in ptSize in pxScale
iPhone SE (3rd gen)375 × 667750 × 1334@2x
iPhone 14390 × 8441170 × 2532@3x
iPhone 15 Pro Max430 × 9321290 × 2796@3x
iPad Pro 12.9"1024 × 13662048 × 2732@2x
iPad mini (6th gen)744 × 11331488 × 2266@2x

The scale factor is accessible via UIScreen.main.scale (for UIKit) and @Environment(\.displayScale) (for SwiftUI). It is used when loading assets: the system automatically selects the image with the @2x or @3x suffix from Assets.xcassets. Developers should not load @1x images on Retina devices — this reduces performance and quality.

CGPoint and coordinates in points

The CGPoint structure is the basic type for representing coordinates in iOS and macOS. It contains two fields: x (CGFloat) and y (CGFloat), values are specified in points. CGPoint is used in all Apple frameworks: UIKit (frame.origin), Core Graphics (CGContext), SpriteKit (SKNode.position), Core Animation (CALayer.position).

swift
// CGPoint — working with coordinates in points
import UIKit

// Creating a point
let point = CGPoint(x: 100.0, y: 200.0)
print("Coordinates: \(point.x), \(point.y)")

// Mathematical operations
let offset = CGPoint(x: 16.0, y: 8.0)
let translated = CGPoint(
    x: point.x + offset.x,
    y: point.y + offset.y
)

// Distance between points
func distance(from a: CGPoint, to b: CGPoint) -> CGFloat {
    let dx = b.x - a.x
    let dy = b.y - a.y
    return sqrt(dx * dx + dy * dy)
}

// Converting points to pixels
extension CGPoint {
    func toPixels(scale: CGFloat) -> CGPoint {
        CGPoint(x: x * scale, y: y * scale)
    }
}

The toPixels method in the example demonstrates converting points to physical pixels via UIScreen.main.scale. In UIKit, this conversion happens automatically during rendering, but in Core Graphics and when working with Metal, the developer may need explicit pixel conversion. All animation calculations, collision detection, and layout are performed in points.

UIFont.pointSize and typography

The UIFont.pointSize property returns the font size in points — this is the standard typography unit in iOS, inherited from print (1 pt = 1/72 inch). Apple has used pt for fonts since the early versions of Mac OS. In iOS, font size is specified in points via UIFont.systemFont(ofSize:) or via SwiftUI Font.system(size:).

swift
// Working with UIFont.pointSize in Swift
import UIKit

// Creating a font with size in pt
let titleFont = UIFont.systemFont(ofSize: 28.0, weight: .bold)
let bodyFont = UIFont.systemFont(ofSize: 17.0)
let captionFont = UIFont.systemFont(ofSize: 12.0)

// Reading pointSize
print("Title size: \(titleFont.pointSize) pt")

// Dynamic Type — automatic scaling
let scaledFont = UIFontMetrics.default.scaledFont(for: bodyFont)
print("Scaled: \(scaledFont.pointSize) pt")

// Comparing font sizes
func font(from size: CGFloat, weight: UIFont.Weight) -> UIFont {
    UIFont.systemFont(ofSize: size, weight: weight)
}

UIFontMetrics is a dynamic font scaling mechanism added in iOS 11. It automatically adjusts pointSize based on the user accessibility settings (Settings > Display & Brightness > Text Size). Without using UIFontMetrics, fonts do not scale, which violates WCAG accessibility requirements.

pt vs px: what is the difference

The difference between pt and px is critical for understanding iOS development. pt is a logical unit, px is a physical unit. One point can correspond to 1, 2, or 3 pixels depending on the scale factor. The developer operates in points, the system converts them to pixels at the rasterization stage.

Characteristicptpx
Unit typeLogical (device-independent)Physical (hardware pixel)
Depends on resolutionNoYes
Where usedUIKit, SwiftUI, Core Graphics, layoutImages, Metal, raw buffer
Conversion1 pt = scale × px (scale from 1 to 3)1 px = pt / scale
Example (iPhone 15 Pro)393 × 852 pt1179 × 2556 px

Key takeaway: the interface size in points is the same across all devices of the same class. A 375 pt wide screen — this applies to both iPhone SE and iPhone 14 (base model). The only difference is how many physical pixels fit into those 375 pt. This ensures a uniform UI without manual adaptation for each device.

pt in SwiftUI

In SwiftUI, the developer does not explicitly operate in points — all sizes are specified via Dp (device-independent points, equivalent to pt). SwiftUI automatically applies the scale factor during rendering but provides access to it through the environment value displayScale.

swift
// SwiftUI — working with points and scale factor
import SwiftUI

struct ContentView: View {
    @Environment(\.displayScale) private var displayScale

    var body: some View {
        VStack(spacing: 16) {
            Text("Title")
                .font(.system(size: 28, weight: .bold))

            Text("Example body text")
                .font(.body)

            HStack {
                Text("Scale factor:")
                    .font(.caption)
                Text("\(displayScale, specifier: "%.1f")")
                    .font(.caption.weight(.bold))
            }
        }
        .padding(20)
        .frame(width: 300)
    }
}

SwiftUI abstracts pt at the framework level. .font(.body) automatically uses Dynamic Type — the font size adjusts to the user settings. SwiftUI does not allow specifying font size in pixels — only through Font and the typography system. This guarantees interface accessibility without additional developer effort.

Frequently asked questions

What is the difference between pt and px?

pt — a logical iOS point, independent of screen resolution. px — a physical display pixel. One point on iPhone 15 Pro equals three pixels (@3x), on iPad Pro — two (@2x). The developer always operates in points.

How to find out the device scale factor?

In UIKit: UIScreen.main.scale. In SwiftUI: @Environment(\.displayScale). Typical values: 1.0 (@1x), 2.0 (@2x), 3.0 (@3x). On iPhone 15 Pro Max, the value is 3.0.

What font size should I use for body text?

Apple recommends 17 pt for body text (UIFontTextStyle.body). For headings — 28–34 pt. For captions — 12–13 pt. Dynamic Type styles automatically scale based on the user accessibility settings.

What is Dynamic Type in iOS?

Dynamic Type — the iOS automatic font scaling system introduced in iOS 7. It allows text to adapt to system font size settings (Text Size) and accessibility parameters (Bold Text, Larger Text). Implemented via UIFontMetrics or SwiftUI Font styles.

Do I need to create @1x assets for iOS?

No. Modern Apple devices use Retina displays with @2x or @3x. @1x images are only needed for compatibility with non-Retina iPads (iPad 2, iPad mini 1st gen). Since iOS 13, all devices support at least @2x.

Summary

  • pt — a logical iOS unit that abstracts the interface from physical resolution and scale factor
  • @2x and @3x — scale factors for Retina displays that determine the number of pixels per point
  • CGPoint — a structure for coordinates in points, the foundation of all positioning operations in UIKit
  • UIFont.pointSize — font size in points with Dynamic Type support via UIFontMetrics
  • SwiftUI fully abstracts pt, using Font and Dynamic Type for automatic adaptation
  • Assets for iOS should be provided in @2x and @3x, @1x is not required for modern devices
  • Dynamic Type — a mandatory accessibility mechanism that automatically scales fonts for the user

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also