Hello Māris, thanks a lot. That is hard tobacco for a user like me. What do you mean 'ask the same rendering engine'? Is there a chance to get such boxes for a normal user or is it a case for a c++ programmer?
Mit freundlichen Grüßen, UWE FISCHER -- Ingenieurbüro Fischer Esbecker Str. 8 31036 Eime Tel.: 05182/8325 Mobil: 0172/8876934 -----Ursprüngliche Nachricht----- Von: Maris Nartiss [mailto:maris....@gmail.com] Gesendet: Montag, 20. Dezember 2021 08:25 An: Uwe Fischer <gisfi...@t-online.de> Cc: GRASS user list <grass-user@lists.osgeo.org> Betreff: Re: [GRASS-user] how to derive polygons from text strings AFIAK no* It is more tricky than it might seem as exact dimensions depend not only on font size but also on selected font (see monospace vs condensed fonts), kerning, styling (bold, italics). Thus final size of bonding box of a string is a product of all of its properties. Thus the best option to get the size right is to ask the same rendering engine to calculate exact dimensions as it will know the size it will use. * apart from one used for vector labelling in d.* modules, but that is not exposed to the enduser. See D_get_text_box from display library. Māris. sestd., 2021. g. 18. dec., plkst. 18:50 — lietotājs Uwe Fischer (<gisfi...@t-online.de>) rakstīja: > > Hello list, > > I have a point feature layer with attributes for a text string (call it > 'label') and the fontsize in map units (which are meters in my case). Is > there a way in Grass to derive polygons from this input information which > enclose the label strings when those are used to label the points? For those > who know ArcMap: what I mean is exactly what happens when you save > Annotations as Shapes in ArcCatalog: you get a polygon layer in which each > text string has a polygon hull which fits the height and width, respectively. > > best regards, > > Uwe > > _______________________________________________ > grass-user mailing list > grass-user@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-user _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user