# `GSFont addFeaBlockForFileName:code:`

*Instance Method*

Adds a feature block to the font, basing the type and title on the file name.

## Declaration

```swift
func addFeaBlock(forFileName fileName: String, code: String) -> GSFeaBlock?
```

```objc
- (GSFeaBlock *) addFeaBlockForFileName:(NSString *) fileName code:(NSString *) code;
```

```python
addFeaBlockForFileName_code_(fileName: str, code: str) -> GSFeaBlock
```

## Discussion

The file name determines whether a feature, class, or prefix is created. When an existing block with no code matches the file name, that block is reused.

> **Note**
> This is a low-level API, reserved for uses that deal with the inner workings of a Glyphs package. Consider using the high-level APIs such as `-addFeature:`, `-addClass:`, `-addFeaturePrefix:` instead.

## See Also

### Layout Code

- [`GSFont feaBlockForFileName:`](/Core/GlyphsCore/GSFont/feaBlockForFileName:) — Returns the FEA block (feature, class, prefix) matching the given file name.
- [`GSFont languagesWithLayoutRules`](/Core/GlyphsCore/GSFont/languagesWithLayoutRules) — Script and language tags that have layout rules in the compiled temporary font.

