Giter Site home page Giter Site logo

Comments (6)

gphat avatar gphat commented on June 10, 2024

I've had frequent reports of problems with older versions of CentOS but I don't recall any with Strawberry. I suspect it's something font related in Cairo, not in Clicker.

from chart-clicker.

Htbaa avatar Htbaa commented on June 10, 2024

Thanks for the swift reply. Any pointers on how to change the font? I could check it right away.

from chart-clicker.

gphat avatar gphat commented on June 10, 2024

my $defctx = $cc->get_context('default');
$defctx->range_axis->label_font->family('Hoefler Text');

I don't think it's the font, mind you. I think it's the font backend.

Have you tried using Cairo.pm directly and drawing some text.

from chart-clicker.

Htbaa avatar Htbaa commented on June 10, 2024

Tried to change the font, not difference.
I've run http://api.metacpan.org/source/XAOC/Cairo-1.090/examples/png/text.pl and that one does properly draw text.
http://api.metacpan.org/source/XAOC/Cairo-1.090/examples/freetype-font.pl however doesn't because Font::FreeType isn't installed (and doesn't compile either, it also doesn't have any good results at CPAN Testers). Though I doubt Font::FreeType is required?

from chart-clicker.

Htbaa avatar Htbaa commented on June 10, 2024

Also tried it under a freshly installed Strawberry Perl 5.14.2 (32-bit) but it had the same effect. Sadly I no longer use Linux on my laptops or desktops, so I can't test those platforms.

Edit: Installed a Ubuntu 11.10 VM and this generates the graphs properly.

from chart-clicker.

mguz avatar mguz commented on June 10, 2024

Hi,

I use Chart::Clicker V2.86 with ActiveState Perl V5.14.2 on Windows 7 32 bit (win32).
First I had the same results reported above.
After inserting a line in Graphics::Primitive::Driver::Cairo.pm the output was almost similar to the example-files:

foreach my $line (@{ $comp->layout->lines }) {
    my $text = $line->{text};
    my $tbox = $line->{box};

     next if not(defined($text)) || ($text eq '');   # <- This is the new added line

The only restriction is, that I can use just one font type, regardless the font type I choose.
Font size could be adjusted.
I think that the source of the problem is somewhere in a module in
Graphics::Primitive
or
Graphics::Primitive::Driver::Cairo::TextLayout
which has a different behaviour under Windows than under Linux.
It seems not to be a Cairo driver problem.

This is the example plot file from this server:

line_example_from_server

This is my generated output after inserting the line described above:

line_with_first_modification

The second modification is just to set the ticks number from 5 to 6

line_with_second_modification

from chart-clicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.