How to create a text with size can been viewable in DRC

Hi sir,
I want to add some text in the drawing after DRC result , here is my code..
look like I can make insert text into drawing , but some of that can't been viewable.
BUT , when select that area , I can get the text , what can I do for that?
I also want to know that how to change the text size and type....
Thanks.

l2 = layout.layer(72,0)
total_table = layout.cell("TOP")
textX=-160000000
textY=-160000000
max_die_countXY.sort.reverse.each do |xx|
total_table.shapes(l2).insert(RBA::Text::new("#{xx}",textX,textY))
textY=(textY- 50000000).round(0)
end

Comments

  • Hello @jiunnweiyeh

    Basically that should work.

    There is a problem, if your TOP cell contains a single text only. In that case, KLayout thinks the cell does not have an area and will not show the text.

    But that is only a problem when there is a single text only. As soon as there two or more texts on different locations or other shapes, this effect is not seen.

    You can try to add an additional marker shape and see if the problem disappears:

    # add to code
    total_table.shapes(l2).insert(RBA::Box::new(textX-1000,textY-1000,textX+1000,textY+1000))
    

    Matthias

  • Not sure about DRC, but there is "a thing" about the default text
    font not scaling (the others all do). You might want to look at
    asserting one of the other fonts, as a start?

  • Hi Matthias,
    Thanks , it is workable.

    Hi Dick,
    Yes , actually I want to see the text been scaling like a polygon.
    But I have no idea for how to do that.
    as Matthias's code , I can make a mark in where to let our designer to view/see the result.
    that is workable , but text can been scaling will been better.

  • Another suggestion which might work, is that I've seen that
    the "Shapes Library" has a TEXT primitive PCell. I have not
    really dug into that, but since it's probably all Python-y in
    its guts perhaps it plays nice with scripting and could be
    placed to do whatever the job is?

    A nice thing about that is, you might also be able to neatly
    script removing all those instances, where getting rid of only
    the texts DRC added, might be "iffy" or at least more difficult.

    I imagine that you might be able to copy such a PCell to a
    unique name and make subsequent harvesting even easier.

  • I do notice that on my layouts, a text will "drive" the display
    extent (so probably all computed extents) but will only do
    so as far as the origin sits. Not the displayed width of the text.
    Everything outboard of the origin (subject to display padding)
    is cut off.

  • Hi Dick,
    in this cell , our team and I try to shown some of DRC result as text into that cell to let our designer know something, such as some notice or text ....
    That will noticed our designer (maybe person A to person B) , he/her have do some DRC check / make some change or something like a GDS history .
    And that text will not been a polygon to make into real Mask , just for designer /human to know somethinkg.
    That is why this cell only have text object , we make it as a history /version change list .
    And we have to let our designer view-able (to see) that wording or they maybe forget /miss something.
    I had try to output a text file as a report , but sometimes designer miss it.....

  • @jiunnweiyeh Did you try the "scalable font" setting?

    It's here in File/Setup:

    You need to choose a scalable font (every font which is not "default"). You also need to specify a text size unless the Text object provides a text size by itself). With this setting, the fonts scale when zooming in or out.

    Matthias

  • Hi Matthias,
    Got it ,Thanks.

Sign In or Register to comment.