Add text to your layout

By 16 November 2018Nazca Layout, Nazca Foundry

Adding text

How to add text to your layout

Your PIC design will make more sense with text to identify different parts of your design.
This can be done by using the Nazca text() function. The text() function returns a cell with provided text of specified parameters. Below is a simple example of placing text in Nazca.

import nazca as nd

nd.text('Nazca-Design').put()

nd.export_gds()

Text is flexible in height, layer, placement, alignment and font.
The default ‘nazca’ font is foundry friendly, as it has no sharp angles, no islands and no closed areas. If needed, the default ‘nazca’ font can be changed to the following other fonts: ‘liberation’, ‘cousine’ and ‘ocra’.

import nazca as nd

message = 'Nazca-Design'
nd.text(text=message, height=30, layer=1, align='cc').put(0, 0)

f = nd.Font('cousine')
f.text(text=message, height=20, layer=2, align='cc').put(0, 40)

nd.export_gds()

Example below shows placing of text in Nazca using available parameters.
Make sure to use demofab_klayout_colors.lyp to view the mask in KLayout.

import nazca as nd

message = "Nazca, open source Photonic IC design in Python 3!"
for i in range(7):
    T1 = nd.text(text=message, height=70*0.85**i, align='lb')
    T1.put(0, -i*100)
    T1.put(0, -1200+i*100)

    T2 = nd.text(text=message, height=70*0.85**i, align='rb')
    T2.put(4000, -i*100)
    T2.put(4000, -1200+i*100)

nd.text('NAZCA', height=500, align='cc', layer=2).put(0.5*4000, -600)
nd.export_gds()

Related Tutorials

Nazca LayoutNazca FoundryPhotonic BBs
19 January 2018

Create a building block using Polygons

In this example we show how to create a building block from Polygons.
Nazca LayoutNazca FoundryPhotonic BBs
19 January 2018

Create a photonic crystal using a GDS array

In this example we show how to create a photonic crystal using GDS array.
Nazca LayoutNazca FoundryPhotonic BBs
14 January 2018

How to create a building block from GDS

In this example we show how to make a building block from a GDS file.