Menu

abcCairo / Blog: Recent posts

fl_abcCairo able to handle larger tune images

I have today (10 March 2023) checked in some changes which will allow you to
view larger tune images in fl_abcCairo. The ideal way to do this would be to add
scrollbars. Unfortunately this is not easy because FLTK support of Cairo is
limited and does not seem to let you create a cairo image area to draw on in the
way you might expect. Hopefully this is something that will be better in FLTK 1.4.
The solution I have created gives you buttons to move up and down the image
instead.

Posted by James Allwright 2023-03-10

fl_abcCairo

I have made a new release today (10 Dec 2022) which adds code for fl_abcCairo. This is
an abc tune viewer, very similar to gtk_abcCairo, but built using the FLTK window
toolkit instead of the GTK toolkit.

Posted by James Allwright 2022-12-10

gtk_abcCairo (abc display utility) added

I have made a new release today (19 Nov 2022). This release adds support for user fonts with the %%setfont-1 to %%setfont-4
commands in the abc 2.2 standard which have been supported for PostScript in abcm2ps for some time. It is now possible to
use these to create custom Pango fonts in PNG, SVG and PDF images.

The other main change is that the GTK folder in the source code contains source for a small GTK program gtk_abcCairo
that allows you display an abc tune on-screen. The abc tune is provided as a file which can either be given on the
command line or selected with a GUI menu if there was no file on the command line. A button allows you to resize
the image. This program is fairly small and demonstrates how to use abcCairo with GTK but is also intended to be a
standalone program that can be useful on its own. ... read more

Posted by James Allwright 2022-11-19

abcm2psC becomes abcCairo

I have made a new release on 21 Oct 2022. There are two main changes in this release.
Firstly, I have renamed the abcm2psC executable as abcCairo. Secondly, the -F option
to use .fmt files was previously not working because the two pass mechanism was not
designed to cope with loading in the files. This is now fixed.

Posted by James Allwright 2022-10-21

New Release 22 Sept 2022

I have made a new release on 22 Sept 2022. The main change is that I have fixed a
number of memory leaks. These won't have been a problem if you just run the program
as a standalone executable since the memory is tidied up when the program exits.
However, it may be useful in the future if I convert the executable to the form of a
C library.

Posted by James Allwright 2022-09-22

New Release 7 Sept 2022

I have made a new release on 7 Sept 2022. The main change is that this
fixes a bug in the handling of various command-line options that set
parameters for the generation of the output image. I have also made
some changes to improve the code, but these won't be apparent to
the user.

Posted by James Allwright 2022-09-07

Support for pages of PDF output

The latest release on 4 June 2022 adds support for generating pages of PDF
output directly with the Cairo library using the -PPDF flag. The output is very
similar to the output that results from first creating a PostScript file and then
converting it to PDF using a utility such as pstopdf, but only one step is needed
and there is no PostScript created anywhere in the process.

Posted by James Allwright 2022-06-04

Support for EPS, SVG and PDF

There is a new release today (4 May 2022). This fixes a problem with encapsulated
Postscript (EPS) support so that it is now generated properly with the -E option.
More exciting is that I have added support for generating SVG and PDF files
using the Cairo library. These are generated one tune per file in the same way as
PNG is generated, but by selecting SVG or PDF as the cairo backend instead of PNG.

Posted by James Allwright 2022-05-04

New release incorporating abcm2ps bug fixes

I have made a new release today (8 April 2022) incorporating updates/bug fixes
to abcm2ps.

Posted by James Allwright 2022-04-08

New abcCairo release

The abcCairo release today (24 March 2022) adds support for the microtone sharp and flat
symbols, which were previously not supported. It also fixes a number of small issues with
the generated output.

Posted by James Allwright 2022-03-24

Scaling the PNG image

The latest version of abcCairo allows you to use -s and -CPNG together to scale
your music image. Although the PNG-generation shares the -s option with the
Postscript-generation (which is part of the original abcm2ps code), the effect is
different. For Postscript, the width of the output is fixed, so making the notes
bigger means you get fewer of them onto a line. For PNG, the width and height
of the image is scaled, so the whole image just gets bigger and the proportions
stay the same.

Posted by James Allwright 2021-10-07

Announcing a Windows version of abcCairo

It turns out that the hard work of compiling the Cairo library and all its
dependencies for Windows has already been done by Jeff Preshing, who
has created a DLL for Windows. Using this, and also a DLL for regex, I
have managed to create a port of abcCairo for Windows. I have renamed
the executable abcm2psC.exe for Windows and packaged it together
with the necessary Windows DLL files, so that you can download a
Windows executable. I develop this using wine windows emulator on
Linux, but it has been tested on Windows 10 and works there.

Posted by James Allwright 2021-08-06

Customizing Cairo for non-Linux systems

The approach of building abcCairo for an OS other than Linux seems to run into problems
with the font handling. Specifically, the libfontconfig library seems to expect a Linux-style
filesystem to find fonts, so it is unlikely to work on another OS. Fortunately, it is possible
to build the Cairo library without libfontconfig by following these steps in the Cairo library
directory:

make clean
./configure --enable-fc=no
make

The configure step selects various options for building the source code. After this, the
libfontconfig library does not needed to be linked into the executable. The Cairo library
provides what appears to be a Windows-specific option which looks as if it might do the
job of replacing libfontconfig in a Windows environment e.g.

./configure --enable-fc=no --enable-win32-font=yes

I have not tested this approach.

Posted by James Allwright 2021-07-17

Compiling abcm2ps with abcCairo extension from static libraries

Compiling abcm2ps with abcCairo extension from static libraries

On a Linux system, such as Ubuntu, it is fairly easy to compile abcm2ps
with the abcCairo extension. The program makes use of a whole lot of
different libraries, but because the system largely handles these for
you, you may well not even have to consider these when building the code.

However, if you want to port the code to a different system, such as a
Windows PC or an Apple computer, you probably need to give
some thought about where the libraries come from. Because the libraries
are open-source, you can download them, but you may run into problems
compiling them on another system. I decided to try building the code
using static libraries built from the source distributions rather than
relying on my system's dynamic libraries.... read more

Posted by James Allwright 2021-05-13

Libraries and making abcCairo more Portable

abcm2ps is provided as C code. The C language is standardized
and C compilers exist for all the popular computer platforms, so
you might think that re-compiling the code on another platform
would be a trivial exercise.

However, re-compiling on a different type of computer turns out
to be a little harder because of the dependency on libraries. In
the case of the abcCairo code, this is the Cairo and Pango
libraries. To understand what the problem is, I will describe
the process of building a significant program.... read more

Posted by James Allwright 2021-05-06
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.