# line-cap-square icon

Line cap square. Gentleface icon, drawn on the 16 px pixel grid. Free, MIT licensed. Page: https://gentleface.com/icons/line-cap-square

- Category: Design
- Use it for: square cap, projecting cap
- Tags: line cap, square cap, projecting cap, cap, stroke, stroke end, line end, linecap, stroke-linecap, square, projecting, extended, figma, illustrator, design tool, vector
- Family: line-cap-butt, line-cap-round, line-color, line-join-bevel, line-join-miter, line-join-round, line-style, line-weight
- Component name: LineCapSquareIcon
- Added: 2026-10-29
- Since: version 0.2.0
- npm: `import { LineCapSquareIcon } from '@gentleface/react';` (@gentleface/react 0.2.0)
- Changed: 2026-10-30 (added)

## Files

Each SVG is 16 × 16 with fill="currentColor". Keep it at 16 px or an exact multiple (32, 48) on whole pixels: a fractional size or position blurs it.

- line-round: https://gentleface.com/svg/line-round/16/line-cap-square.svg · PNG https://gentleface.com/png/line-round/16/line-cap-square.png · https://gentleface.com/png/line-round/32/line-cap-square.png · https://gentleface.com/png/line-round/48/line-cap-square.png
- line-soft: https://gentleface.com/svg/line-soft/16/line-cap-square.svg · PNG https://gentleface.com/png/line-soft/16/line-cap-square.png · https://gentleface.com/png/line-soft/32/line-cap-square.png · https://gentleface.com/png/line-soft/48/line-cap-square.png
- line-sharp: https://gentleface.com/svg/line-sharp/16/line-cap-square.svg · PNG https://gentleface.com/png/line-sharp/16/line-cap-square.png · https://gentleface.com/png/line-sharp/32/line-cap-square.png · https://gentleface.com/png/line-sharp/48/line-cap-square.png
- solid-round: https://gentleface.com/svg/solid-round/16/line-cap-square.svg · PNG https://gentleface.com/png/solid-round/16/line-cap-square.png · https://gentleface.com/png/solid-round/32/line-cap-square.png · https://gentleface.com/png/solid-round/48/line-cap-square.png
- solid-soft: https://gentleface.com/svg/solid-soft/16/line-cap-square.svg · PNG https://gentleface.com/png/solid-soft/16/line-cap-square.png · https://gentleface.com/png/solid-soft/32/line-cap-square.png · https://gentleface.com/png/solid-soft/48/line-cap-square.png
- solid-sharp: https://gentleface.com/svg/solid-sharp/16/line-cap-square.svg · PNG https://gentleface.com/png/solid-sharp/16/line-cap-square.png · https://gentleface.com/png/solid-sharp/32/line-cap-square.png · https://gentleface.com/png/solid-sharp/48/line-cap-square.png

The SVG of every style: https://gentleface.com/icons/line-cap-square.json (`svg`).

## Code (line-round)

The snippets are decorative (aria-hidden). For an icon that carries meaning on its own, such as an icon-only button, label the button, or give the SVG role="img" and an aria-label. For another style, take its SVG from the JSON and swap the path `d`.

### SVG

```svg
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z"/></svg>
```

### React

```tsx
// Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square
import type { SVGProps } from 'react';

export function LineCapSquareIcon(props: SVGProps<SVGSVGElement>) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
      <path d="M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z" />
    </svg>
  );
}
```

### Vue

```vue
<!-- Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square -->
<template>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
    <path d="M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z" />
  </svg>
</template>
```

### Svelte

```svelte
<!-- Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square -->
<script>
  let props = $props();
</script>

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
  <path d="M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z" />
</svg>
```

### HTML img

```html
<!-- Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square. An <img> can't take currentColor: it draws black. Inline the SVG or use the CSS mask to color it. -->
<img src="https://gentleface.com/svg/line-round/16/line-cap-square.svg" width="16" height="16" alt="">
```

### CSS

```css
/* Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square. Takes the text color. */
.icon-line-cap-square {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
```

### Data URL

```text
data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z'/%3E%3C/svg%3E
```

### Sprite

```html
<!-- Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square
     Every icon of this style in one file: https://gentleface.com/sprite/line-round.svg
     Serve it from your own origin: <use> does not load from another origin. -->
<svg width="16" height="16" aria-hidden="true"><use href="/sprite/line-round.svg#line-cap-square"/></svg>
```

### SwiftUI

```swift
// Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square
import SwiftUI

struct LineCapSquareIcon: Shape {
    func path(in rect: CGRect) -> Path {
        var p = Path()
        p.move(to: CGPoint(x: 2, y: 11))
        p.addLine(to: CGPoint(x: 14.5, y: 11))
        p.addCurve(to: CGPoint(x: 14.856, y: 11.144), control1: CGPoint(x: 14.641, y: 11), control2: CGPoint(x: 14.759, y: 11.048))
        p.addCurve(to: CGPoint(x: 15, y: 11.5), control1: CGPoint(x: 14.952, y: 11.241), control2: CGPoint(x: 15, y: 11.359))
        p.addCurve(to: CGPoint(x: 14.856, y: 11.856), control1: CGPoint(x: 15, y: 11.641), control2: CGPoint(x: 14.952, y: 11.759))
        p.addCurve(to: CGPoint(x: 14.5, y: 12), control1: CGPoint(x: 14.759, y: 11.952), control2: CGPoint(x: 14.641, y: 12))
        p.addLine(to: CGPoint(x: 1.5, y: 12))
        p.addCurve(to: CGPoint(x: 1.144, y: 11.856), control1: CGPoint(x: 1.359, y: 12), control2: CGPoint(x: 1.241, y: 11.952))
        p.addCurve(to: CGPoint(x: 1, y: 11.5), control1: CGPoint(x: 1.048, y: 11.759), control2: CGPoint(x: 1, y: 11.641))
        p.addLine(to: CGPoint(x: 1, y: 3.5))
        p.addCurve(to: CGPoint(x: 1.144, y: 3.144), control1: CGPoint(x: 1, y: 3.359), control2: CGPoint(x: 1.048, y: 3.241))
        p.addCurve(to: CGPoint(x: 1.5, y: 3), control1: CGPoint(x: 1.241, y: 3.048), control2: CGPoint(x: 1.359, y: 3))
        p.addLine(to: CGPoint(x: 14.5, y: 3))
        p.addCurve(to: CGPoint(x: 14.856, y: 3.144), control1: CGPoint(x: 14.641, y: 3), control2: CGPoint(x: 14.759, y: 3.048))
        p.addCurve(to: CGPoint(x: 15, y: 3.5), control1: CGPoint(x: 14.952, y: 3.241), control2: CGPoint(x: 15, y: 3.359))
        p.addCurve(to: CGPoint(x: 14.856, y: 3.856), control1: CGPoint(x: 15, y: 3.641), control2: CGPoint(x: 14.952, y: 3.759))
        p.addCurve(to: CGPoint(x: 14.5, y: 4), control1: CGPoint(x: 14.759, y: 3.952), control2: CGPoint(x: 14.641, y: 4))
        p.addLine(to: CGPoint(x: 2, y: 4))
        p.addLine(to: CGPoint(x: 2, y: 11))
        p.closeSubpath()
        p.move(to: CGPoint(x: 7, y: 6))
        p.addLine(to: CGPoint(x: 7, y: 7))
        p.addLine(to: CGPoint(x: 14.5, y: 7))
        p.addCurve(to: CGPoint(x: 14.856, y: 7.144), control1: CGPoint(x: 14.641, y: 7), control2: CGPoint(x: 14.759, y: 7.048))
        p.addCurve(to: CGPoint(x: 15, y: 7.5), control1: CGPoint(x: 14.952, y: 7.241), control2: CGPoint(x: 15, y: 7.359))
        p.addCurve(to: CGPoint(x: 14.856, y: 7.856), control1: CGPoint(x: 15, y: 7.641), control2: CGPoint(x: 14.952, y: 7.759))
        p.addCurve(to: CGPoint(x: 14.5, y: 8), control1: CGPoint(x: 14.759, y: 7.952), control2: CGPoint(x: 14.641, y: 8))
        p.addLine(to: CGPoint(x: 7, y: 8))
        p.addLine(to: CGPoint(x: 7, y: 9))
        p.addLine(to: CGPoint(x: 4, y: 9))
        p.addLine(to: CGPoint(x: 4, y: 8.501))
        p.addLine(to: CGPoint(x: 4, y: 8.5))
        p.addLine(to: CGPoint(x: 4, y: 6))
        p.addLine(to: CGPoint(x: 7, y: 6))
        p.closeSubpath()
        return p.applying(CGAffineTransform(scaleX: rect.width / 16, y: rect.height / 16))
    }
}

// LineCapSquareIcon().frame(width: 16, height: 16) fills with the foreground style. Keep it on whole points to stay crisp.
```

### Compose

```kotlin
// Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.addPathNodes
import androidx.compose.ui.unit.dp

val LineCapSquareIcon: ImageVector by lazy {
    ImageVector.Builder(
        name = "line-cap-square", defaultWidth = 16.dp, defaultHeight = 16.dp,
        viewportWidth = 16f, viewportHeight = 16f,
    ).addPath(
        pathData = addPathNodes("M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z"),
        fill = SolidColor(Color.Black),
    ).build()
}

// Icon(LineCapSquareIcon, contentDescription = null) tints it with LocalContentColor.
```

### Android XML

```xml
<!-- res/drawable/ic_line_cap_square.xml · Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="16dp"
    android:height="16dp"
    android:viewportWidth="16"
    android:viewportHeight="16"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M2 11L14.5 11C14.641 11 14.759 11.048 14.856 11.144C14.952 11.241 15 11.359 15 11.5C15 11.641 14.952 11.759 14.856 11.856C14.759 11.952 14.641 12 14.5 12L1.5 12C1.359 12 1.241 11.952 1.144 11.856C1.048 11.759 1 11.641 1 11.5L1 3.5C1 3.359 1.048 3.241 1.144 3.144C1.241 3.048 1.359 3 1.5 3L14.5 3C14.641 3 14.759 3.048 14.856 3.144C14.952 3.241 15 3.359 15 3.5C15 3.641 14.952 3.759 14.856 3.856C14.759 3.952 14.641 4 14.5 4L2 4L2 11ZM7 6L7 7L14.5 7C14.641 7 14.759 7.048 14.856 7.144C14.952 7.241 15 7.359 15 7.5C15 7.641 14.952 7.759 14.856 7.856C14.759 7.952 14.641 8 14.5 8L7 8L7 9L4 9L4 8.501L4 8.5L4 6L7 6Z"/>
</vector>
```

### Flutter

```dart
// Gentleface "line-cap-square" (line-round), MIT. https://gentleface.com/icons/line-cap-square
import 'package:flutter/widgets.dart';

class LineCapSquareIcon extends StatelessWidget {
  const LineCapSquareIcon({super.key, this.size = 16, this.color});
  final double size;
  final Color? color;

  @override
  Widget build(BuildContext context) => CustomPaint(
        size: Size.square(size),
        painter: _LineCapSquareIconPainter(color ?? IconTheme.of(context).color ?? const Color(0xFF000000)),
      );
}

class _LineCapSquareIconPainter extends CustomPainter {
  _LineCapSquareIconPainter(this.color);
  final Color color;

  @override
  void paint(Canvas canvas, Size size) {
    canvas.scale(size.width / 16, size.height / 16);
    final p = Path()
      ..moveTo(2, 11)
      ..lineTo(14.5, 11)
      ..cubicTo(14.641, 11, 14.759, 11.048, 14.856, 11.144)
      ..cubicTo(14.952, 11.241, 15, 11.359, 15, 11.5)
      ..cubicTo(15, 11.641, 14.952, 11.759, 14.856, 11.856)
      ..cubicTo(14.759, 11.952, 14.641, 12, 14.5, 12)
      ..lineTo(1.5, 12)
      ..cubicTo(1.359, 12, 1.241, 11.952, 1.144, 11.856)
      ..cubicTo(1.048, 11.759, 1, 11.641, 1, 11.5)
      ..lineTo(1, 3.5)
      ..cubicTo(1, 3.359, 1.048, 3.241, 1.144, 3.144)
      ..cubicTo(1.241, 3.048, 1.359, 3, 1.5, 3)
      ..lineTo(14.5, 3)
      ..cubicTo(14.641, 3, 14.759, 3.048, 14.856, 3.144)
      ..cubicTo(14.952, 3.241, 15, 3.359, 15, 3.5)
      ..cubicTo(15, 3.641, 14.952, 3.759, 14.856, 3.856)
      ..cubicTo(14.759, 3.952, 14.641, 4, 14.5, 4)
      ..lineTo(2, 4)
      ..lineTo(2, 11)
      ..close()
      ..moveTo(7, 6)
      ..lineTo(7, 7)
      ..lineTo(14.5, 7)
      ..cubicTo(14.641, 7, 14.759, 7.048, 14.856, 7.144)
      ..cubicTo(14.952, 7.241, 15, 7.359, 15, 7.5)
      ..cubicTo(15, 7.641, 14.952, 7.759, 14.856, 7.856)
      ..cubicTo(14.759, 7.952, 14.641, 8, 14.5, 8)
      ..lineTo(7, 8)
      ..lineTo(7, 9)
      ..lineTo(4, 9)
      ..lineTo(4, 8.501)
      ..lineTo(4, 8.5)
      ..lineTo(4, 6)
      ..lineTo(7, 6)
      ..close();
    canvas.drawPath(p, Paint()..color = color);
  }

  @override
  bool shouldRepaint(_LineCapSquareIconPainter old) => old.color != color;
}
```
