Skip to main content
This topic has been closed for replies.
Correct answer Eugene Tyson

you could put in a text frame and anchor it in the text. 


There's a script that can create your own font 

https://opentype.info/blog/2012/06/27/logo-font-indesign.html

 

And I wrote this script that puts numbers 1 - 200 in a circle - a text frame over a circle really

 

You just need to adjust the line weight - and use whichever font you want. 

You can then use the script to ad-hoc add to Indy Font.

 

I'm not sure this approach will work - but just an idea. I've never used Indy Font. 

 

Start with a very large page

#target indesign

var doc = app.activeDocument;

// Function to create a circled number
function createCircledNumber(num, x, y) {
    var circleSize = 20;
    var margin = 5;

    // Create the circle
    var circle = doc.ovals.add();
    circle.geometricBounds = [y, x, y + circleSize, x + circleSize];
    circle.strokeWeight = 1;
    circle.strokeColor = doc.swatches.item("Black");
    circle.fillColor = doc.swatches.item("None");

    // Add the number inside the circle
    var textFrame = doc.textFrames.add();
    textFrame.contents = num.toString();
    textFrame.textFramePreferences.verticalJustification = VerticalJustification.CENTER_ALIGN;
    textFrame.texts[0].justification = Justification.CENTER_ALIGN;
    textFrame.geometricBounds = [y, x, y + circleSize, x + circleSize];
    textFrame.texts[0].pointSize = 10; // Adjust font size
}

// Initial position
var x = 10;
var y = 10;
var margin = 30; // Margin between circles

// Loop to create circled numbers from 1 to 200
for (var i = 1; i <= 200; i++) {
    createCircledNumber(i, x, y);
    x += margin; // Move to the next position horizontally
    if (x > doc.documentPreferences.pageWidth - margin) {
        x = 10; // Reset x position
        y += margin; // Move to the next row
    }
}

https://www.indiscripts.com/post/2013/05/indyfont-1-1-public-pro-release-and-users-guide

 

3 replies

James Gifford—NitroPress
Legend
July 1, 2024

This came up a few months ago and what was discussed (which I think is the topic of the YT video as well) was to use a circular border —

 

Imperfect, but as free as it gets. You may need multiple styles for each count of digits.

dublove
dubloveAuthor
Legend
July 2, 2024

A very good method, but this seems to only be used in the head of the paragraph. What should I do if it is used in the text?
The character style does not seem to have this function.
I mainly use it in foot notes.

 

Follow -up, if Adobe can have the function of any character circle.
That's great.

Eugene TysonCommunity ExpertCorrect answer
Community Expert
July 2, 2024

you could put in a text frame and anchor it in the text. 


There's a script that can create your own font 

https://opentype.info/blog/2012/06/27/logo-font-indesign.html

 

And I wrote this script that puts numbers 1 - 200 in a circle - a text frame over a circle really

 

You just need to adjust the line weight - and use whichever font you want. 

You can then use the script to ad-hoc add to Indy Font.

 

I'm not sure this approach will work - but just an idea. I've never used Indy Font. 

 

Start with a very large page

#target indesign

var doc = app.activeDocument;

// Function to create a circled number
function createCircledNumber(num, x, y) {
    var circleSize = 20;
    var margin = 5;

    // Create the circle
    var circle = doc.ovals.add();
    circle.geometricBounds = [y, x, y + circleSize, x + circleSize];
    circle.strokeWeight = 1;
    circle.strokeColor = doc.swatches.item("Black");
    circle.fillColor = doc.swatches.item("None");

    // Add the number inside the circle
    var textFrame = doc.textFrames.add();
    textFrame.contents = num.toString();
    textFrame.textFramePreferences.verticalJustification = VerticalJustification.CENTER_ALIGN;
    textFrame.texts[0].justification = Justification.CENTER_ALIGN;
    textFrame.geometricBounds = [y, x, y + circleSize, x + circleSize];
    textFrame.texts[0].pointSize = 10; // Adjust font size
}

// Initial position
var x = 10;
var y = 10;
var margin = 30; // Margin between circles

// Loop to create circled numbers from 1 to 200
for (var i = 1; i <= 200; i++) {
    createCircledNumber(i, x, y);
    x += margin; // Move to the next position horizontally
    if (x > doc.documentPreferences.pageWidth - margin) {
        x = 10; // Reset x position
        y += margin; // Move to the next row
    }
}

https://www.indiscripts.com/post/2013/05/indyfont-1-1-public-pro-release-and-users-guide

 

Scott Falkner
Community Expert
Community Expert
July 1, 2024
Community Expert
July 1, 2024

Pretty sure we can do it without a font

 

https://www.youtube.com/watch?v=L08nc-C7fbA&ab_channel=CreativeProNetwork

 

I don't know of any font specifically - but can keep looking.

It also might be scriptable. 

Please let us know all your considerations for circling numbers - what's the circumstance you're trying to create/fix in your layouts?

dublove
dubloveAuthor
Legend
July 1, 2024

Sad, I can't visit Youtube

leo.r
Community Expert
Community Expert
July 1, 2024
quote

Sad, I can't visit Youtube

By @dublove

 

Ha. Indeed, YouTube is blocked in China, I didn't know that. Can you use VPN though? Some VPNs are freely available as part of a browser functionality (Opera has it and, I think, Firefox).