Recent posts

#41
General Discussion / Re: Font list is garbled
Last post by a.l.e - February 02, 2025, 08:53:43 AM
i fear that wayland might be the problem here.

would you mind trying with the devel version?

https://sourceforge.net/projects/scribus/files/scribus-devel/1.7.0/ has an appimage...
#42
General Discussion / Re: Font list is garbled
Last post by Riquez - February 01, 2025, 07:15:21 PM
I have the exact same issue. Also using Manjaro. (gnome/wayland)
Laptop is AMD Ryzen 5 4500U, 24GB ram

Scribus 1.6.2
I tried various themes in scribus, all present the same issue.
#43
Beginner Talk / Re: Color of guides and snappi...
Last post by kenerling - February 01, 2025, 12:25:57 PM
Quote from: a.l.e on January 29, 2025, 11:05:32 PM... and now kerneling will start counting the key that need to be pressed : - )
Hold on! I'm still winded from the last demonstration!  ;)


Quote from: a.l.e on January 30, 2025, 09:16:35 AMbtw, concerning the usage of the align and distribute tool, i've opened a ticket
Cool! Thanks!


Quote from: a.l.e on January 30, 2025, 09:16:35 AMi already regularly have to fight the snapping heuristic
Yes, in just my month or so with Scribus, I've already noticed that snapping can be a battle, especially when "Snap to grid" is activated.


Quote from: a.l.e on January 30, 2025, 09:16:35 AMpersonally, my wish would be to make the center element snapping optional (with a preference/setup switch)
That is exactly what I was thinking, to make snapping more manageable when there's lots of snapping interference. However, I would take it a step further, and make all of the snap points optional. So, with any frame, the user could indicate to snap with only the upper-left corner, or only the upper-right-corner, or only the left edge, etc.. Even better would be the possibility of combining them, e.g., activate snapping with the upper-left corner and the frame center, but none of the other frame corners or edges would snap.

That ability, to snap using only X part of the frame, in combination with the choices at Page > Snap to (...), would give, I think, great flexibility to snapping.

I would also suggest (I know this isn't the place, but while we're discussing things) making the page edge and margins separate from the guides. And one other big one that I saw and agree with elsewhere, is the ability to snap to the bleed edge. So, imagine at Page > Snap to (...):

Snap to grid
Snap to bleed edge
Snap to page edge
Snap to margins
Snap to guides
Snap to items

All that said, I do want to add that as I'm wrapping my head around the program, I'm finding it to be a very satisfying piece of programming.

Cheers to all!
#44
Code / Re: PythonAPI and groups
Last post by MrB - January 30, 2025, 09:05:07 PM
There is the function getGroupItems(), so not sure what you're trying to do. Maybe some sample code? If some function is missing in Scripter, then we can add it.
#45
Code / PythonAPI and groups
Last post by tropion - January 30, 2025, 05:07:39 PM
Is there a good reason for why the PythonAPI can not access objects in groups?
#46
Beginner Talk / Re: Color of guides and snappi...
Last post by a.l.e - January 30, 2025, 04:11:46 PM
page width is... pagewidth : - )

ah, btw, iirc there was a bug with the colors of the guides, but should be fixed in the latest releases...
#47
Beginner Talk / Re: Color of guides and snappi...
Last post by Nermander - January 30, 2025, 04:03:44 PM
I recall some program (probably CAD) where when snapping you kind of got a tool where you moved the mouse in circles around the position to select what to snap to... It may have been AutoCAD 35 years ago :)
#48
Beginner Talk / Re: Color of guides and snappi...
Last post by Nermander - January 30, 2025, 04:02:01 PM
Quote from: a.l.e on January 29, 2025, 11:05:32 PM2. in the x field of the pp append "-width/2"

I wasn't sure if the width variable was for the object width or the page width. But it is the object then?

I think I have placed guides in the middle of the page using "width/2".
#49
Code / Keyboard shortcuts for bold an...
Last post by a.l.e - January 30, 2025, 03:32:50 PM
Recently, I've seen people asking again for Scribus having shortcuts for bold and italics.

I gave my standard answer ("it's more complicated than you think"). I also wrote about two possible workarounds (one works in 1.7 -- adding a python script in the script menu and using the action search -- the other needs a patch that is in pending review in the bug tracker, using the style applier based on the action search).
The explanation had a few more details than usual.

After having written that, I was inspired to sketch a way to implement this feature in a "simpler" way.

In short:

  • Scribus gets two actions, "Apply Bold" and "Apply Italics", with a shortcut attached (by default ctrl+shift+b and ctrl+shift-i)
  • The actions are based on three heuristics, two based on rules provided by the user (font styles to be replaced, char styles to be replaced) and one automatic (an automatic algorithm)
  • The action is performed by applying the first matching rule

Here some more details

  • If the user has defined a font replacement ("Noto Sans Regular" -> "Noto Sans Bold") that matches, it will be applied.
  • If the user has defined a char style replacement ('My fancy char' -> 'My fancy bold') that matches, it will be applied.
  • Otherwise, Scribus has an algorithm that helps finding the matching bold face (if the font has a 'bold' face, apply it; if the current face is 'demi' and there is a 'book' face, apply it...). We can improve the algorithm step by step. Enabling the "automatic" step is optional.
  • In a first step, it's an action, not a state switch: it goes through the selected text and switches between bold and "regular", or in the other direction depending, on what matches.
    This allows us to implement the feature without touching at the text representation in memory or in the file.
  • In a second step, the data structure will track if bold has been applied or not, allowing to correctly detect, if the bold face has been applied to all or part of the selection.
    A three states buttons can then be added to the content palette and the feature will work as the user is used from other applications.


My plan is to let defined The rules in the document settings (and maybe also in the preferences: people use different fonts and styles in different documents; not sure how useful global rules can be).
It will be possible to export and import the rules and it should be possible to inherit them by using document templates.

Here a list of tickets that relate to this feature:


I've created a first draft of the configuration dialog:

bold-italics.png

Voilà: any feedback?
#50
Scripts and Plugins / Exporting to PDF/X1a via scrib...
Last post by maple - January 30, 2025, 09:34:05 AM
As a volunteer I am preparing a small magazine. As a former programmer with little time, I prefer to have things scripted so as not to forget anything and to be precise. I export several versions: draft with images, draft without images, web final (PDF 1.5, sRGB, with links, embed/subset fonts), print version (no links, no transparency, CMYK, bleeds, crop marks, outline fonts). Print shop prefers PDF/X1a, but can handle PDF 1.3 and also PDF 1.4, but then needs to fix things and process is slower (I need to confirm results).

I have Python scripts for each export that run Scribus from the command line. To be consistent and not forget any parameters. Print export example:

scribus.openDoc(filein)
pdf = scribus.PDFfile()
pdf.file = fileout
pdf.version = 11 # PDF/X1a
pdf.fontEmbedding = 1 # outline
pdf.outdst = 1 # print
pdf.pageLayout = 3 # face right first
pdf.quality = 0 # quality of embedding objects
pdf.registrationMarks = False
pdf.colorMarks = False
pdf.bleedMarks = True
pdf.useDocBleeds = True
pdf.markOffset = 3 # mark offset
pdf.docInfoMarks = True
pdf.noembicc = True # do not use embedded ICC profiles
pdf.save()
scribus.closeDoc()
But I ran into a problem with outlining fonts with PD/X1a. Something is wrong with a sans serif face and I cannot find the reason. When I set the output to PDF 1.3, everything is fine. When I set PDF/X1a, Scribus does not outline but subset (not sure why) and crashes on OpenSans (signal 11). See output:

pdf font "Lexend Bold"
"/Fo0" uses method "Subset" and encoding 0
pdf font "Lexend Regular"
"/Fo1" uses method "Subset" and encoding 0
pdf font "Lexend SemiBold"
"/Fo2" uses method "Subset" and encoding 0
pdf font "Noto Serif Regular"
"/Fo3" uses method "Subset" and encoding 0
pdf font "Poppins Bold"
"/Fo4" uses method "Subset" and encoding 0
pdf font "Poppins SemiBold"
"/Fo5" uses method "Subset" and encoding 0
pdf font "Roboto Bold"
"/Fo6" uses method "Subset" and encoding 0
pdf font "Roboto Italic"
"/Fo7" uses method "Subset" and encoding 0
pdf font "Roboto Regular"
Scribus Crash
-------------
Scribus crashes due to Signal #11

I have tried replacing the font with NotoSans and now I am using Roboto. Still the same result with all three. The fonts are Google fonts and are not variable size. Only the regular version causes problems. Bold and italics are fine. I have tried removing pages to find out what is wrong, if it is some toxic glyph. Nothing happened. Many hours of trial and error :-)

I am running Scribus Appimage on Debian 12, versions 1.6.3 and 1.7.0, both with the same result. It would be nice if I could put Scribus into some sort of debug mode to better find out what is wrong - and then file a bug. I would be happy to help with this investigation. Or maybe I am doing something wrong.