Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. word wrapping

word wrapping

Scheduled Pinned Locked Moved The Lounge
htmlcssquestion
60 Posts 20 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    Say I don't have room to wrap a single world like supercalifragilisticexpialidocious. In the real world, I'd just find a syllable and then hyphenate. I don't think I can do that - and i don't think i *should* do that in html and css. I don't know *what* to do. What would you do?

    Real programmers use butterflies

    M Offline
    M Offline
    maze3
    wrote on last edited by
    #50

    If me I'd question if this a complication that actually needs handling or just a programming challenge I want to figure out. Real world: what application this on, why would there not be enough screen space in current era. If was user input box on very narrow component, well the problem is flipped why user inputting into narrow viewed space, why cant space be increased. if label - again flip word. having it increase height of space might not be desirable, so leaves truncation "." "..." as an option. Put generically: figure out if this a problem that needs solving or if asking the wrong question.

    H 1 Reply Last reply
    0
    • M maze3

      If me I'd question if this a complication that actually needs handling or just a programming challenge I want to figure out. Real world: what application this on, why would there not be enough screen space in current era. If was user input box on very narrow component, well the problem is flipped why user inputting into narrow viewed space, why cant space be increased. if label - again flip word. having it increase height of space might not be desirable, so leaves truncation "." "..." as an option. Put generically: figure out if this a problem that needs solving or if asking the wrong question.

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #51

      I mean that's fair, but here's the thing: I don't know the screen size and it may be as small as 300px across. It's an e-reader 300px is not practical for an e-reader, I know - but it's more about me not knowing the functional design specs of the hardware yet. I'm coding defensively in light of lack of solid specs yet. We simply can't know the specs yet, but it will probably be about 600px across like the nook but there may be a smaller version that's more pocketable if that's practical. Still, if they zoom in, or if the title (H1 tag) is long it could still be a problem.

      Real programmers use butterflies

      1 Reply Last reply
      0
      • H honey the codewitch

        Adding, you didn't mention an atmega before so I'm not sure what you're quoting. In any case I didn't agree or disagree with that statement because you didn't make it. This is what I responding to:

        Maybe you should tell your client that the project they contracted you for is not completely realisable on their choice of hardware.

        Real programmers use butterflies

        U Offline
        U Offline
        User 13269747
        wrote on last edited by
        #52

        Quote:

        Adding, you didn't mention an atmega before so I'm not sure what you're quoting.

        I'm quoting this post over here, which as you can see contains the sentence you missed: The Lounge[^]

        Quote:

        This is what I responding to: Maybe you should tell your client that the project they contracted you for is not completely realisable on their choice of hardware.

        Seems you're in agreement with that too, since you say:

        Quote:

        not that I'm trying to implement all of it - just enough to show most epubs mostly correctly.

        That's what "not completely realisable" means.

        H 1 Reply Last reply
        0
        • U User 13269747

          Quote:

          Adding, you didn't mention an atmega before so I'm not sure what you're quoting.

          I'm quoting this post over here, which as you can see contains the sentence you missed: The Lounge[^]

          Quote:

          This is what I responding to: Maybe you should tell your client that the project they contracted you for is not completely realisable on their choice of hardware.

          Seems you're in agreement with that too, since you say:

          Quote:

          not that I'm trying to implement all of it - just enough to show most epubs mostly correctly.

          That's what "not completely realisable" means.

          H Offline
          H Offline
          honey the codewitch
          wrote on last edited by
          #53

          First of all, you never mentioned the atmega in that post. I just looked at the link you gave me. I didn't miss a sentence. What was being discussed was the Arduino framework. It is only incidently related to an atmega in that an atmega will run it. It's not the only thing that does.

          Member 13301679 wrote:

          That's what "not completely realisable" means.

          It's what this means

          Member 13301679 wrote:

          Maybe you should tell your client that the project they contracted you for is not completely realisable

          I bolded the relevant bits. You forgot the operative part. I was never contracted to build a 100% to spec e-reader.

          Real programmers use butterflies

          U 1 Reply Last reply
          0
          • H honey the codewitch

            First of all, you never mentioned the atmega in that post. I just looked at the link you gave me. I didn't miss a sentence. What was being discussed was the Arduino framework. It is only incidently related to an atmega in that an atmega will run it. It's not the only thing that does.

            Member 13301679 wrote:

            That's what "not completely realisable" means.

            It's what this means

            Member 13301679 wrote:

            Maybe you should tell your client that the project they contracted you for is not completely realisable

            I bolded the relevant bits. You forgot the operative part. I was never contracted to build a 100% to spec e-reader.

            Real programmers use butterflies

            U Offline
            U Offline
            User 13269747
            wrote on last edited by
            #54

            Quote:

            First of all, you never mentioned the atmega in that post. I just looked at the link you gave me. I didn't miss a sentence. What was being discussed was the Arduino framework. It is only incidently related to an atmega in that an atmega will run it. It's not the only thing that does.

            Okay, what do you see as the second sentence in [^]?

            Quote:

            Member 13301679 wrote: That's what "not completely realisable" means. It's what this means Member 13301679 wrote: Maybe you should tell your client that the project they contracted you for is not completely realisable I bolded the relevant bits. You forgot the operative part. I was never contracted to build a 100% to spec e-reader.

            The operative part being that you don't do this for money? It's damn funny then that you lecture some who does get paid for embedded stuff you are trying to learn :-) Anyway, back to the topic, you bolded the part where I said it's not compeletely realisable, and then you said you can do most of it, mostly. Sounds like you agree but can't bring yourself to admit it. No as much as I like to see people whine that "I can't see the word atmega in a paragraph of two sentences" when given a direct link, I cannot entertain your self-humiliation much longer - as a professional I have paying clients to attend to. You'd do the same once you start getting paid for your "work".

            H 1 Reply Last reply
            0
            • U User 13269747

              Quote:

              First of all, you never mentioned the atmega in that post. I just looked at the link you gave me. I didn't miss a sentence. What was being discussed was the Arduino framework. It is only incidently related to an atmega in that an atmega will run it. It's not the only thing that does.

              Okay, what do you see as the second sentence in [^]?

              Quote:

              Member 13301679 wrote: That's what "not completely realisable" means. It's what this means Member 13301679 wrote: Maybe you should tell your client that the project they contracted you for is not completely realisable I bolded the relevant bits. You forgot the operative part. I was never contracted to build a 100% to spec e-reader.

              The operative part being that you don't do this for money? It's damn funny then that you lecture some who does get paid for embedded stuff you are trying to learn :-) Anyway, back to the topic, you bolded the part where I said it's not compeletely realisable, and then you said you can do most of it, mostly. Sounds like you agree but can't bring yourself to admit it. No as much as I like to see people whine that "I can't see the word atmega in a paragraph of two sentences" when given a direct link, I cannot entertain your self-humiliation much longer - as a professional I have paying clients to attend to. You'd do the same once you start getting paid for your "work".

              H Offline
              H Offline
              honey the codewitch
              wrote on last edited by
              #55

              I like that you think I'm trying to learn. I get paid to write embedded. I'm done with you. I have no patience for hubris.

              Real programmers use butterflies

              1 Reply Last reply
              0
              • P PIEBALDconsult

                --------------------
                Well, I'd split on a
                ​space if ​possible,
                but that isn't
                always possible,
                particularly with
                "supercalifragilisti
                cexpialidocious",
                which exceeds the
                line length all on
                its own.

                S Offline
                S Offline
                SeattleC
                wrote on last edited by
                #56

                Clip it. That will punish content creators for using words like supercalifragilisticexpialidocious, and they will stop doing that.

                1 Reply Last reply
                0
                • H honey the codewitch

                  Say I don't have room to wrap a single world like supercalifragilisticexpialidocious. In the real world, I'd just find a syllable and then hyphenate. I don't think I can do that - and i don't think i *should* do that in html and css. I don't know *what* to do. What would you do?

                  Real programmers use butterflies

                  E Offline
                  E Offline
                  englebart
                  wrote on last edited by
                  #57

                  It sounds like you are leaning toward a hard break at the display margin. Instead of using a hyphen, how about another pair of symbols? I am thinking of the proof readers notation when two words are supposed to be joined. It is like a subscripted “u” that connects the words. Draw half of it on the break, and the other half on the continuation. Or use an ellipsis at both the break and the continuation. Or just a random hyphen. Don’t worry about being correct for a word like that. It will likely never happen.

                  H 1 Reply Last reply
                  0
                  • E englebart

                    It sounds like you are leaning toward a hard break at the display margin. Instead of using a hyphen, how about another pair of symbols? I am thinking of the proof readers notation when two words are supposed to be joined. It is like a subscripted “u” that connects the words. Draw half of it on the break, and the other half on the continuation. Or use an ellipsis at both the break and the continuation. Or just a random hyphen. Don’t worry about being correct for a word like that. It will likely never happen.

                    H Offline
                    H Offline
                    honey the codewitch
                    wrote on last edited by
                    #58

                    I think I might implement this: Section 5.9. Line-Breaking Properties | Unicode Explained[^]

                    Real programmers use butterflies

                    1 Reply Last reply
                    0
                    • H honey the codewitch

                      Say I don't have room to wrap a single world like supercalifragilisticexpialidocious. In the real world, I'd just find a syllable and then hyphenate. I don't think I can do that - and i don't think i *should* do that in html and css. I don't know *what* to do. What would you do?

                      Real programmers use butterflies

                      B Offline
                      B Offline
                      BernardIE5317
                      wrote on last edited by
                      #59

                      You might consider "soft hyphens" - Cheerio

                      H 1 Reply Last reply
                      0
                      • B BernardIE5317

                        You might consider "soft hyphens" - Cheerio

                        H Offline
                        H Offline
                        honey the codewitch
                        wrote on last edited by
                        #60

                        I have since found something called the Unicode Line Breaking algorithm and I've decided to go that route.

                        Real programmers use butterflies

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups