Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chord overflows when it is in the end of the line #11

Open
joshualessadias opened this issue Mar 6, 2022 · 19 comments
Open

chord overflows when it is in the end of the line #11

joshualessadias opened this issue Mar 6, 2022 · 19 comments

Comments

@joshualessadias
Copy link

Screenshot_1646537325
it probably happens because the line breaking only watches the string size, not the chord size

@auhsor
Copy link
Collaborator

auhsor commented Mar 7, 2022

Thanks for this. This is an issue that we are aware of and plan to fix once time permits :)

@auhsor
Copy link
Collaborator

auhsor commented Mar 12, 2022

So I've been working on a fix for this. I've rewritten the code for processing the text and will hopefully be ready for testing shortly.

@paurakhsharma
Copy link
Owner

Thanks, @auhsor looking forward to it.

@auhsor
Copy link
Collaborator

auhsor commented Mar 17, 2022

No problem. I'm getting quite close to getting this working. I've rewritten the code a bunch of times as different edge cases caused issues.

@jeremiahlukus
Copy link
Collaborator

Any update on this?

@alexaung
Copy link

alexaung commented Sep 5, 2022

Are you guy still maintaining this plugin? Otherwise, I need to find for other option cause my client is complaining this issue :D

@jeremiahlukus
Copy link
Collaborator

Send a PR @alexaung

@paurakhsharma
Copy link
Owner

Hey @alexaung sorry about that. I am working on a fix for it. For now, you can include widgetPadding parameter to fix this issue. This is just a workaround, for now, a better fix is incoming.

@alexaung
Copy link

alexaung commented Sep 6, 2022

Ok, widgetPadding: 60, solved the issue. Thanks for workaround.

@fadhly-permata
Copy link

Hey @alexaung sorry about that. I am working on a fix for it. For now, you can include widgetPadding parameter to fix this issue. This is just a workaround, for now, a better fix is incoming.

this is work for dynamic font size???

I plan to add increse/decrease font size on my apps

@paurakhsharma
Copy link
Owner

@fadhly-permata yes it will work for dynamic font size as well.

@fadhly-permata
Copy link

fadhly-permata commented Feb 24, 2023

Yep, I've tested.

It's working for dynamic font size. Thanks @paurakhsharma

@jtaxiexpress
Copy link

Thanks for making a good package.

Has this problem been fixed?
I used padding.
スクリーンショット 2023-04-07 10 44 42

@paurakhsharma
Copy link
Owner

@jtaxiexpress can you please show the example code.

@jtaxiexpress
Copy link

@paurakhsharma Thanks response

 Widget getPreview(){
    try{
      return LyricsRenderer(
        lyrics: '''${getLyrics()}''',
        textStyle: TextStyle(fontSize: 18, color: Colors.black,fontFamily: "Brand-Regular",),
        chordStyle: TextStyle(fontSize: 20, color: Colors.blue,fontFamily: "Brand-Bold",),
        onTapChord: (String chord) {
          print('pressed chord: $chord');
        },
        showChord: true,
        // transposeIncrement: transposeIncrement,
        // scrollSpeed: scrollSpeed,
        widgetPadding:154,
        lineHeight: 4,
        // horizontalAlignment: CrossAxisAlignment.start,
      );
    }catch(e){
      return Center(child: CircularProgressIndicator(color: Colors.blue,),);
    }
  }
        Positioned(
                bottom: 0.0,
                left: 0.0,
                right: 0.0,
                child: Padding(
                  padding: const EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0),
                  child: Container(
                    height: containerHeight2,
                    // height: containerHeight2,
                    width: double.infinity,
                    child:Expanded(
                      child: Container(
                        padding: const EdgeInsets.all(12.0),
                        decoration: const BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.only(topRight: Radius.circular(15.0),topLeft: Radius.circular(15.0)),
                        ),
                        child: getPreview(),
                      ),
                    ),


                  ),
                ),
              ),

@paurakhsharma
Copy link
Owner

@jtaxiexpress looks like this is happening because you do not have space in your lyrics. And the line cannot break. Can you try again by adding space in the middle of your lyrics.

This is the example lyrics I have used.

[C]もーもたろさんももたろさん、 おこしにつけた[D]、,,

image

@jtaxiexpress
Copy link

@paurakhsharma Thanks !
But Japanese is not written in separate characters.

ex )
en)This is a pen. And this is an apple.
ja)これはペンです。そしてこれはりんごです。

What should I do?

@paurakhsharma
Copy link
Owner

@jtaxiexpress Oh that sounds interesting. Currently, this package splits the text if it cannot fit in a line from a blank space. But I don't know how we might break the line in this case. Do you consider to be similar to space (i.e is it sensible to split a line using )?

@jtaxiexpress
Copy link

@paurakhsharma Yes !
This is a Pen.
これはペンです。

。 is the English word . in English.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants