Recent posts

#41
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?
#42
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.
#43
Beginner Talk / Re: Color of guides and snappi...
Last post by a.l.e - January 30, 2025, 09:16:35 AM
btw, concerning the usage of the align and distribute tool, i've opened a ticket:

0017393: Make the Align and distribute tool more comfortable to use
https://bugs.scribus.net/view.php?id=17393

personally, i'm not sure if adding more snapping points would really be a win for scribus.
i already regularly have to fight the snapping heuristic, to get it to snap to the right element / guide.

i must admit that my only experience with "complex" snapping points is in inkscape.
it has way more snapping points then one can wish.
they work better than in scribus.
and "each" can be enabled or disabled.
but having the right one activated when you need it, feels overwhelming to me.
(sadly, i don't use inkscape very often, and i mostly only use basic feature, so i might be representative there...).

personally, my wish would be to make the center element snapping optional (with a preference/setup switch).
so: as you might have guessed, less centering is fine to me : - )
#44
General Discussion / Re: I can't force light mode i...
Last post by DavidGDFC - January 29, 2025, 11:53:26 PM
Thanks! It looks like my account for the bugs website still works, though I opened it a long time ago and I had forgotten about it.

I think I should be fine sticking to the development branch, as I love the new interface. I don't need Scribus for professional reasons: I'd just would like to learn to create nice documents.

Any advice on where to start in terms of tutorials or guides?
#45
General Discussion / Re: I can't force light mode i...
Last post by MrB - January 29, 2025, 11:33:51 PM
We only just released 1.7.0 (note it's supposed to be a development version, although likely pretty stable for most work. We'd still recommend keeping 1.6.3 around for real work).

There is an account called DavidGDFC on bugs.scribus.net that I can reset the password of, if you like.

Forums is more where help is received, ideas discussed etc. bugs.scribus.net is where we actually track bugs and feature requests.
#46
Beginner Talk / Re: Color of guides and snappi...
Last post by a.l.e - January 29, 2025, 11:05:32 PM
@ nermander:

good hint, but point 2. is not needed : - )

1. snap the left edge to the guide
2. in the x field of the pp append "-width/2"

... and now kerneling will start counting the key that need to be pressed : - )
#47
General Discussion / Re: I can't force light mode i...
Last post by DavidGDFC - January 29, 2025, 11:01:05 PM
That's great news! Is there are an estimated date for 1.7.1?

Also, if I have another issue or if I want to make a request, should I report it here or in this other forum you've shown me?

Before I wrote my first message, I checked if I had an old Scribus account, and all I found was an account on something called "Mantis Bug Tracker" or something like that. My details didn't work to access this forum and that's why I created a new account.
#48
General Discussion / Re: I can't force light mode i...
Last post by MrB - January 29, 2025, 10:23:04 PM
We'll probably add the ability to force a light/dark mode in 1.7.1. It's not a problem as such, we'd just need to add the feature. We already have a feature tracking this at https://bugs.scribus.net/view.php?id=17391
#49
General Discussion / I can't force light mode in Sc...
Last post by DavidGDFC - January 29, 2025, 09:59:10 PM
Hi,

This is my first post in this forum. First of all, thanks for developing this great software. I hope I have placed my issue in the right category.

As soon as it was released, I installed Scribus 1.7.0, and because my Windows is in dark mode, the whole interface of Scribus turned automatically to dark mode. However, I'd like to be able to force Scribus to light mode. It might not make sense, but for esthetic reasons, I keep Windows in dark mode, though I definitely prefer to have my programmes in light mode.

I remember that, when qBitTorrent recently switched to qt6, they had the same problem and I'm guessing it's also the same cause. Apparently it's possible to allow users to select a particular mode regardless whether they have light or dark mode in Windows, but I don't know the technicalities, as I'm not a developer myself.

So, I'm hoping this can be implemented in a feature release.

Thanks!

#50
Beginner Talk / Re: Color of guides and snappi...
Last post by Nermander - January 29, 2025, 08:36:16 PM
Remember that numbers in Scribus can be written as formulas.

So, you can probably do like this:

1. Snap left edge to the guide.
2. Copy the number from the frame width.
3. The in the box for position, after the current number, append "-(the copied number)/2".

That will (hopefully) move the frame to the left with half the width of the frame.