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

Is the text supposed to be rendering this large? #186

Closed
1 task done
codyaweber opened this issue Oct 29, 2019 · 2 comments
Closed
1 task done

Is the text supposed to be rendering this large? #186

codyaweber opened this issue Oct 29, 2019 · 2 comments

Comments

@codyaweber
Copy link

codyaweber commented Oct 29, 2019

  • I've searched other open/closed issues for duplicates before opening up this new issue.

Report

What did you do?

Tried rendering README.md (copied straight from raw)

import UIKit
import Down

class QuickViewController: UIViewController {
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        setUpDownView()
    }
    
    private func setUpDownView() {
        let dv = try! DownView(frame: view.bounds, markdownString: mdString) {
            print("Loaded successfully.")
        }
        view.addSubview(dv)
    }
}

What did you expect to happen?

The DownView to render as shown in the README.md:

What happened instead?

The DownView renders, but appears zoomed, or the text is just displaying larger? It's the same with any other markdown I use. Is this expected behavior that must be overridden in the CSS, or am I doing something wrong?

@smittytone
Copy link

smittytone commented Oct 30, 2019

Another questioner, same question. I'm doing it on macOS. CSS adjustments or DownView frame size changes don't seem to affect it.

@iwasrobbed
Copy link
Collaborator

You can inject your own CSS to change font size using a custom bundle: https://github.com/iwasrobbed/Down/blob/master/Source/Views/DownView.swift#L27

You can see what DownView uses in the DownView.bundle/css folder and just modify the line around font-size:1.5em;line-height:1.6

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

No branches or pull requests

3 participants