Navigation

  • Categories
  • Recent
  • Tags
  • Users
  • Groups
  • Solved
  • Unsolved
  • Search
  • Search
  • Register
  • Login
  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Users
  • Groups
  • Solved
  • Unsolved
  • Search
  1. Home
  2. franciscotorres
  • Profile
  • Following
  • Followers
  • Topics
  • Posts
  • Best
  • Groups

franciscotorres

@franciscotorres

0
Reputation
6
Posts
134
Profile views
0
Followers
0
Following
Joined 17 Oct 2018, 12:30 Last Online 15 Jul 2024, 21:49

franciscotorres Follow

Best posts made by franciscotorres

This user hasn't posted anything yet.

Latest posts made by franciscotorres

  • RE: Help with code & combining idea

    thanks! It seems there's a way.

    what do you mean with cell_h. It is not defined.

    posted in Code snippets
    franciscotorres
    franciscotorres
    15 Jul 2024, 21:49
  • Help with code & combining idea

    Hi,

    I've this code to export some labels I need to print.

    Screenshot 2024-07-10 at 00.45.19.png

    min_val = listFontVariations('Juicyv2')['wdth']['minValue']
    max_val = listFontVariations('Juicyv2')['wdth']['maxValue']
    
    #print(min_val, max_val)
    
    steps = 30
    step_size = (max_val - min_val) / (steps-1)
    
    # loop over a range of 100
    for i in range(steps):
        # for each loop create a new path
        newPage(595.27559055, 96.377952756)
        
        # draw a rect with the size of the page
        rect(0, 0, width(), height())
        fill(255, 255, 255) 
        #rect(0, 73.7007874011, width(), 8.5039370079)
        
        bp = BezierPath()
        curr_value = min_val + i * step_size
        fontVariations(wdth= curr_value)
        fstr = FormattedString("JUICY.ttf", font='Juicylixo', tracking=-1, fontSize=93, fontVariations = {'wdth' : curr_value})
        
        fill(1)
        bp.text(fstr, (14, 15.3))
        drawPath(bp)
           
        font("Staff-Regular")
        fontSize(6.7)
        text('%f' % curr_value, (540, 15.3))
        
        for contour in bp:
            for segment in contour:
                fill(1, 0, 0)
                baselineShift(-0.25)
                fontSize(3)
                text('🍎', segment[-1], align = "center")
    
    
    saveImage("Label.pdf")
    

    But then I was manually importing them to InDesign to an A3 page and placing 10 each page to print. It gets boring and InDesign takes a lot of time to export pdf A3 pages with so many imported pdf labels.

    Screenshot 2024-07-10 at 00.47.05.png

    I'm curious if this is something easier to do 100% inside DrawBot. Any help?

    I just want to keep the same concept: Decide how many Labels and to have always a different position on the font design space.

    posted in Code snippets
    franciscotorres
    franciscotorres
    9 Jul 2024, 23:51
  • RE: Help combining ideas

    Love you 🖤

    posted in General Discussion
    franciscotorres
    franciscotorres
    28 Jul 2022, 14:35
  • RE: Help combining ideas

    Screenshot 2022-07-28 at 15.08.44.png

    Yes it helped, thanks @jo ! However, not perfect yet. Now the text is being repeated the number of the steps I choose in the beginning of the script, when the idea is just to do it once each page.

    I tried to define the curr_value & fstr outside of the loop and then update it inside but it's not working. I need a bit more help 👼

    min_val = listFontVariations('Juicyv1')['wdth']['minValue']
    max_val = listFontVariations('Juicyv1')['wdth']['maxValue']
    
    
    bp = BezierPath()
    #curr_value = 6
    
    
    
    steps = 5
    step_size = (max_val - min_val) / (steps-1)
    
    # loop over a range of 100
    for i in range(steps):
        curr_value = min_val + i * step_size
        fontVariations(wdth= curr_value )
        # for each loop create a new path
        newPage(680.31496063, 82.204724409)
        # set a random fill color
        # fill(random(), random(), random())
        # draw a rect with the size of the page
        rect(0, 0, width(), height())
        fill(255, 255, 255) 
        # draw a White rect with the size of the pag
        rect(0, 73.7007874011, width(), 8.5039370079)
        # set a font and font size
        #font("Juicyv1")
        #text(txt, (10, 10))
        fstr = FormattedString("JUICY", font='Juicyv1', fontSize=80, fontVariations = {'wdth' : curr_value})
        bp.text(fstr, (10, 10))
        drawPath(bp)
        
        for contour in bp:
            for segment in contour:
                fill(1, 0, 0)
                baselineShift(-0.25)
                fontSize(3.5)
                text('🍎', segment[-1], align = "center")
    
    posted in General Discussion
    franciscotorres
    franciscotorres
    28 Jul 2022, 14:20
  • Help combining ideas

    Hi,

    let's imagine I know nothing about python & Drawbot. Can anyone help me combining this two ideas (and organising properly the script)? It seems basic, but I can't figure out the solution.

    I want several Pages with different fontVariations, but I can't make the text with the apples follow those variations.

    Screenshot 2022-07-27 at 22.48.36.png

    Idea 1

    min_val = listFontVariations('Skia-Regular')['wght']['minValue']
    max_val = listFontVariations('Skia-Regular')['wght']['maxValue']
    
    txt = "IUC"
    
    
    steps = 3
    step_size = (max_val - min_val) / (steps-1)
    
    # loop over a range of 100
    for i in range(steps):
        # for each loop create a new path
        newPage(680.31496063, 82.204724409)
        # set a random fill color
        # fill(random(), random(), random())
        # draw a rect with the size of the page
        rect(0, 0, width(), height())
        fill(255, 255, 255) 
        rect(0, 73.7007874011, width(), 8.5039370079)
        
        # set a font and font size
        font("Skia-Regular")
        fontSize(80)
        tracking(-1)
        # colour text
        fill(1, 1, 0)
        # draw text
        curr_value = min_val + i * step_size
        fontVariations(wdth= curr_value)
        text(txt, (10, 10))
            
        
        font("Papyrus")
        fontSize(20)
        fill(0, 255, 255)
        fontVariations(wdth= 1)
        text('variableCider: %f' % curr_value, (450, 10)) 
       
    

    Idea 2

    min_val = listFontVariations('Skia-Regular')['wght']['minValue']
    max_val = listFontVariations('Skia-Regular')['wght']['maxValue']
    
    bp = BezierPath()
    
    steps = 3
    step_size = (max_val - min_val) / (steps-1)
    
    # loop over a range of 100
    for i in range(steps):
        # for each loop create a new path
        newPage(680.31496063, 82.204724409)
        # set a random fill color
        # fill(random(), random(), random())
        # draw a rect with the size of the page
        rect(0, 0, width(), height())
        fill(255, 255, 255) 
        rect(0, 73.7007874011, width(), 8.5039370079)
        curr_value = min_val + i * step_size
        fontVariations(wdth= curr_value )
        bp.text("JUICY",(10,10), font='Skia-Regular', fontSize=80)
        drawPath(bp)
        
        for contour in bp:
            for segment in contour:
                fill(1, 0, 0)
                baselineShift(-0.25)
                fontSize(3.5)
                text('🍎', segment[-1], align = "center")
    

    Thanks in advance!

    posted in General Discussion
    franciscotorres
    franciscotorres
    27 Jul 2022, 21:51
  • RE: Video quality

    Hello,

    I tried to exporting a mp4 and it works fine, but when I try to change the resolution (to 300) I get this error:

    drawBot.misc.DrawBotError: Exporting to mp4 doesn't support odd pixel dimensions for width and height.
    

    When exporting .gif it works fine when I set imageResolution=300.

    What am I doing wrong?

    posted in General Discussion
    franciscotorres
    franciscotorres
    13 May 2021, 13:57
Drawing With Python